diff options
| author | Oliver Neukum <[email protected]> | 2010-01-12 11:32:50 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2010-01-20 23:24:34 +0000 |
| commit | acbe2febe71abb2360b008e9ab3ee5c44169f78c (patch) | |
| tree | 2952e2da8f32b918aaa27fd8ac00e04daa7787af /drivers/usb/core/devices.c | |
| parent | USB: fix bitmask merge error (diff) | |
| download | kernel-acbe2febe71abb2360b008e9ab3ee5c44169f78c.tar.gz kernel-acbe2febe71abb2360b008e9ab3ee5c44169f78c.zip | |
USB: Don't use GFP_KERNEL while we cannot reset a storage device
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 <[email protected]>
Cc: stable <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/core/devices.c')
| -rw-r--r-- | drivers/usb/core/devices.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index 96f11715cd26..355dffcc23b0 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c @@ -494,7 +494,7 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes, return 0; /* allocate 2^1 pages = 8K (on i386); * should be more than enough for one device */ - pages_start = (char *)__get_free_pages(GFP_KERNEL, 1); + pages_start = (char *)__get_free_pages(GFP_NOIO, 1); if (!pages_start) return -ENOMEM; |
