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>
Thu, 1 Apr 2010 22:55:37 +0000 (15:55 -0700)
commit63821748fb4f6d65b4b92ba90b88bf989a512a5d
treebee09cca9b70b0cc815b750a1604e02de96a61da
parentbb4ac89de4a2755a3aacbc252f503957ca00109d
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