USB: Don't use GFP_KERNEL while we cannot reset a storage device
authorOliver Neukum <oliver@neukum.org>
Tue, 12 Jan 2010 11:32:50 +0000 (12:32 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Jan 2010 18:49:31 +0000 (10:49 -0800)
commit186c74d336e2c1377df9e5dc88f7966b2dd6acf7
tree01ff80e0cbe129a6010d5983a3560df9e140c542
parentfa68188da8abe7c20cf44f19326c81a74498b921
USB: Don't use GFP_KERNEL while we cannot reset a storage device

commit acbe2febe71abb2360b008e9ab3ee5c44169f78c upstream.

Memory allocations with GFP_KERNEL can cause IO to a storage
device which can fail resulting in a need to reset the device.
Therefore GFP_KERNEL cannot be safely used between usb_lock_device()
and usb_unlock_device(). Replace by GFP_NOIO.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devices.c
drivers/usb/core/message.c