* [PATCH] usbnet: fix deadlock in resume
@ 2012-08-27 6:41 oliver
2012-08-31 20:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: oliver @ 2012-08-27 6:41 UTC (permalink / raw)
To: davem, netdev, ming.lei; +Cc: Oliver Neukum, Oliver Neukum, stable
From: Oliver Neukum <oliver@neukum.org>
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 <oneukum@suse.de>
CC: stable@kernel.org
---
drivers/net/usb/usbnet.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 8531c1c..fd4b26d 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -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);
--
1.7.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usbnet: fix deadlock in resume
2012-08-27 6:41 [PATCH] usbnet: fix deadlock in resume oliver
@ 2012-08-31 20:12 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-08-31 20:12 UTC (permalink / raw)
To: oliver; +Cc: netdev, ming.lei, oneukum, stable
From: oliver@neukum.org
Date: Mon, 27 Aug 2012 08:41:38 +0200
> From: Oliver Neukum <oliver@neukum.org>
>
> 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 <oneukum@suse.de>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-31 20:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-27 6:41 [PATCH] usbnet: fix deadlock in resume oliver
2012-08-31 20:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).