From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: driverdev-devel@linuxdriverproject.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: comedi: comedi_test: fix timer lock-up
Date: Thu, 30 Oct 2014 13:29:18 -0700 [thread overview]
Message-ID: <20141030202918.GA27910@kroah.com> (raw)
In-Reply-To: <1414663433-11137-1-git-send-email-abbotti@mev.co.uk>
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@mev.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 :(
confused,
greg k-h
next prev parent reply other threads:[~2014-10-30 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 13:07 [PATCH] staging: comedi: comedi_test: fix timer lock-up Ian Abbott
2014-10-30 10:03 ` [PATCH v2] " Ian Abbott
2014-10-30 20:29 ` Greg Kroah-Hartman [this message]
2014-10-30 20:38 ` Ian Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141030202918.GA27910@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=abbotti@mev.co.uk \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.