From: Oliver Neukum Date: Sun, 26 Aug 2012 20:41:38 +0000 (+0000) Subject: usbnet: fix deadlock in resume X-Git-Tag: v3.5.4~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1db3396a544814978c561fa28268eded9cb41542;p=thirdparty%2Fkernel%2Fstable.git usbnet: fix deadlock in resume commit ab6f148de28261682d300662e87b9477f7efc95b upstream. A usbnet device can share a multifunction device with a storage device. If the storage device is autoresumed the usbnet devices also needs to be autoresumed. Allocating memory with GFP_KERNEL can deadlock in this case. This should go back into all kernels that have commit 65841fd5132c3941cdf5df09e70df3ed28323212 That is 3.5 Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index aba769d77459b..d237b3f047e37 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1580,7 +1580,7 @@ int usbnet_resume (struct usb_interface *intf) netif_device_present(dev->net) && !timer_pending(&dev->delay) && !test_bit(EVENT_RX_HALT, &dev->flags)) - rx_alloc_submit(dev, GFP_KERNEL); + rx_alloc_submit(dev, GFP_NOIO); if (!(dev->txq.qlen >= TX_QLEN(dev))) netif_tx_wake_all_queues(dev->net);