lkml.org 
[lkml]   [2012]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ 056/127] Bluetooth: Fix not removing power_off delayed work
* Ben Hutchings <ben@decadent.org.uk> [2012-09-29 00:13:03 +0200]:

> On Fri, 2012-09-28 at 13:33 -0700, Greg Kroah-Hartman wrote:
> > 3.0-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
> >
> > commit 78c04c0bf52360dc2f7185e99c8e9aa05d73ae5a upstream.
> >
> > For example, when a usb reset is received (I could reproduce it
> > running something very similar to this[1] in a loop) it could be
> > that the device is unregistered while the power_off delayed work
> > is still scheduled to run.
> [...]
> > --- a/net/bluetooth/hci_core.c
> > +++ b/net/bluetooth/hci_core.c
> > @@ -588,6 +588,8 @@ static int hci_dev_do_close(struct hci_d
> > {
> > BT_DBG("%s %p", hdev->name, hdev);
> >
> > + cancel_delayed_work(&hdev->power_off);
> [...]
>
> This is not right for 3.0 as the type of hdev->power_off is struct
> work_struct, not struct delayed_work.
>
> When I looked at this for 3.2 it appeared that this fix might not be
> required at all.

Yes, at that time we had a timer to run the work, at some point we changed it
with a delayed_work but I don't remember exactly which version was it, 3.3 I
think.

Gustavo


\
 
 \ /
  Last update: 2012-09-29 01:01    [W:0.396 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site