lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 30 Oct 2014 20:38:09 +0000
From:	Ian Abbott <abbotti@....co.uk>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	driverdev-devel@...uxdriverproject.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: comedi: comedi_test: fix timer lock-up

On 30/10/14 20:29, Greg Kroah-Hartman wrote:
> On Thu, Oct 30, 2014 at 10:03:53AM +0000, Ian Abbott wrote:
>> Commit 240512474424 ("staging: comedi: comedi_test: use
>> comedi_handle_events()") resulted in the timer routine
>> `waveform_ai_interrupt()` calling `comedi_handle_events()` instead of
>> `comedi_events()`.  That had the advantage of automatically stopping the
>> acquisition on overflow/error/end-of-acquisition conditions (by calling
>> the comedi subdevice's "cancel" handler), but currently results in the
>> timer routine locking when one of those conditions occur.  This is
>> because the "cancel" handler `waveform_ai_cancel()` calls
>> `del_timer_sync()`.
>>
>> Fix it by adding a bit to the device private data that indicates whether
>> the acquisition is active or not, and changing the "cancel" handler to
>> use `del_timer()` instead of `del_timer_sync()`.  The bit is set when
>> starting the acquisition, cleared when ending the acquisition (in the
>> "cancel" handler), and tested in the timer routine, which will do
>> nothing if the acquisition is inactive.  Also, make sure any scheduled
>> timeout event gets cancelled when the low-level device gets "detached"
>> from the comedi core by calling `del_timer_sync()` in the "detach"
>> handler `waveform_detach()`.
>>
>> Fixes: 240512474424 ("staging: comedi: comedi_test: use comedi_handle_events()")
>> Signed-off-by: Ian Abbott <abbotti@....co.uk>
>> ---
>> v2: rebased after commit dd28153b2a8ca
>> Greg, this fix is for "linux-next" and "staging-next".
>
> I don't understand, I've already taken this patch, right?  It doesn't
> apply to my branch :(

So you have.  Ignore v2 then.  (I got a merge merge conflict when I 
tried it, which is why I sent the rebased version.)

Thanks.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ