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
| ||
|
Date: Wed, 6 Jul 2011 18:44:25 +0200 From: Arkadiusz Miskiewicz <a.miskiewicz@...il.com> To: Alan Stern <stern@...land.harvard.edu> Cc: Éric Piel <E.A.B.Piel@...elft.nl>, Sarah Sharp <sarah.a.sharp@...ux.intel.com>, Greg KH <gregkh@...e.de>, LKML <linux-kernel@...r.kernel.org>, USB list <linux-usb@...r.kernel.org>, "Rafael J. Wysocki" <rjw@...k.pl> Subject: Re: Regression 3.0-rc6+ : khubd blocked (usbnet_cdc_unbind) On Wednesday 06 of July 2011, Alan Stern wrote: > On Wed, 6 Jul 2011, Éric Piel wrote: > > Hello, > > It seems I'm very unlucky this week and I've come across to what looks > > like a second regression in the kernel. I'm running a version few > > commits after 3.0-rc6, which includes commit e534c5b831c8 "fix > > regression occurring during device removal". > > > > When I plug/unplug/plug a mobile phone, after waiting a few minutes I > > get a "task khubd:621 blocked for more than 120 seconds." Note that it's > > directly connected to my laptop, not via an external hub (although the > > bug also happens with an external hub). > > > > Below is the whole dmesg log (with usb debug messages on) > > > > Let me know if you need me to investigate more, or maybe there is > > already a fix for that bug? > > Ah -- this stack dump points out the reason for the hang. It looks > like that "fix regression..." commit didn't go far enough; I neglected > the fact that interfaces can be unbound out of order when a driver > claims multiple interfaces. > > Adding this patch on top of that commit should fix this. Let me > know what you both get. This one makes usb working after resume from ram (current Linus git + this patch). > > Alan Stern > > > > drivers/usb/core/message.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > Index: usb-3.0/drivers/usb/core/message.c > =================================================================== > --- usb-3.0.orig/drivers/usb/core/message.c > +++ usb-3.0/drivers/usb/core/message.c > @@ -1147,6 +1147,14 @@ void usb_disable_device(struct usb_devic > * any drivers bound to them (a key side effect) > */ > if (dev->actconfig) { > + /* > + * FIXME: In order to avoid self-deadlock involving the > + * bandwidth_mutex, we have to mark all the interfaces > + * before unregistering any of them. > + */ > + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) > + dev->actconfig->interface[i]->unregistering = 1; > + > for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { > struct usb_interface *interface; > > @@ -1156,7 +1164,6 @@ void usb_disable_device(struct usb_devic > continue; > dev_dbg(&dev->dev, "unregistering interface %s\n", > dev_name(&interface->dev)); > - interface->unregistering = 1; > remove_intf_ep_devs(interface); > device_del(&interface->dev); > } -- Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/ -- 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