Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab6f148d authored by Oliver Neukum's avatar Oliver Neukum Committed by David S. Miller
Browse files

usbnet: fix deadlock in resume



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 65841fd5
That is 3.5

Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
CC: stable@kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b72c2009
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1573,7 +1573,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);