lkml.org 
[lkml]   [2013]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dmatest regression in 3.10-rc1
On Wed, May 15, 2013 at 04:28:03PM +0100, Will Deacon wrote:
> I've been observing a regression in the dmatest module with 3.10-rc1. It
> manifests as either:
>
> - a spurious timeout on one or more of the channel threads
> - a complete kernel lockup (loss of console)
> - a panic (see below, noting that the callback [dmatest_callback] is
> dereferencing a NULL pointer)
>
> If I revert 77101ce578bb ("dmatest: cancel thread immediately when asked
> for") then things are rosy again, but I'm not sure if this is hiding another
> problem.

Right, so I think I understand what's causing this, but I'll leave it to
Andriy to suggest a fix. The problem comes about because the dmatest
module is now driven from debugfs, making it possible to unload the module
whilst a test run is in progress. In this case:

- The DMA threads will return from wait_event_freezable_timeout(...)
due to kthread_should_stop() returning true, and subsequently
report failure because done.done is false.

- The DMA engines may not be idle, so the asynchronous callback can
be invoked after we've started cleaning up, explaining the NULL
dereference I'm seeing.

The solutions are either fixing the module exit code to cope with concurrent
DMA transfers or to revert 77101ce578bb and not allow the channel threads to
return mid-transfer.

Will


\
 
 \ /
  Last update: 2013-05-16 18:21    [W:0.109 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site