usbnet: fix deadlock in resume
authorOliver Neukum <oliver@neukum.org>
Sun, 26 Aug 2012 20:41:38 +0000 (20:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2012 16:59:42 +0000 (09:59 -0700)
commit1db3396a544814978c561fa28268eded9cb41542
treeb630ed12e7fec493ca52cfc6783955737eb9d787
parentd6534b3afbbb228c0eed4fa4a6d00a3490a5da52
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 <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/usbnet.c