Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1407305
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic |
| Date | 2016-05-26 02:40 +0200 |
| Message-ID | <rCRvb-7ID-3@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <rxXKW-5Dw-13@gated-at.bofh.it> <rynm1-6jr-7@gated-at.bofh.it> <rAbqs-3On-69@gated-at.bofh.it> <rAVWh-80D-9@gated-at.bofh.it> <rCg2C-Ve-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 24, 2016 at 10:32:53AM +0200, Manfred Schlaegl wrote:
> On 2016-05-20 18:59, Dmitry Torokhov wrote:
> > Hi Manfred,
> >
> > On Wed, May 18, 2016 at 05:16:49PM +0200, Manfred Schlaegl wrote:
> >> @@ -133,6 +149,8 @@ static int pwm_beeper_remove(struct platform_device *pdev)
> >> {
> >> struct pwm_beeper *beeper = platform_get_drvdata(pdev);
> >>
> >> + cancel_work_sync(&beeper->work);
> >> +
> >> input_unregister_device(beeper->input);
> >
> > This is racy, request to play may come in after cancel_work_sync()
> > returns but before we unregistered input device. I think you want the
> > version below.
> >
>
> Hi Dmitry,
>
> yes you are right. Thank you for your feedback.
> I also see that point, but I think it would be a simpler change just
> to cancel the worker after unregistering the device (to reorder
> cancel_work_sync and input_unregister_device).
That is an option, but I wanter to have close() because I also want to
convert the driver to used devm for allocating resources, and then we'd
need close() anyway so that we can get rid of remove() method.
Thanks.
--
Dmitry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] Input: pwm-beeper - defer pwm config if pwm can sleep Manfred Schlaegl <manfred.schlaegl@gmx.at> - 2016-05-13 17:40 +0200
[PATCH] Input: pwm-beeper - fix: scheduling while atomic Manfred Schlaegl <manfred.schlaegl@gmx.at> - 2016-05-18 17:20 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-18 18:10 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Manfred Schlaegl <manfred.schlaegl@gmx.at> - 2016-05-19 10:00 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-05-20 19:00 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Manfred Schlaegl <manfred.schlaegl@gmx.at> - 2016-05-24 10:40 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Manfred Schlaegl <manfred.schlaegl@gmx.at> - 2016-05-24 10:40 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-05-26 02:40 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Manfred Schlaegl <manfred.schlaegl@gmx.at> - 2016-05-27 11:00 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Manfred Schlaegl <manfred.schlaegl@gmx.at> - 2016-05-27 11:20 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Manfred Schlaegl <manfred.schlaegl@gmx.at> - 2016-05-27 11:20 +0200
Re: [PATCH] Input: pwm-beeper - fix: scheduling while atomic Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-05-28 01:40 +0200
csiph-web