summaryrefslogtreecommitdiff
path: root/drivers/usb/core/message.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2008-03-03 20:16:04 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 04:16:33 (GMT)
commiteb764c4be1e5db3ee34df5745e98cf2f148c7320 (patch)
treef434cf49540ab6ea2c7fae6490a693916c2e5501 /drivers/usb/core/message.c
parentfeccc30d90155bcbc937f87643182a43d25873eb (diff)
downloadlinux-fsl-qoriq-eb764c4be1e5db3ee34df5745e98cf2f148c7320.tar.xz
USB: check serial-number string after device reset
This patch (as1048) extends the descriptor checking after a device is reset. Now the SerialNumber string descriptor is compared to its old value, in addition to the device and configuration descriptors. As a consequence, the kmalloc() call in usb_string() is now on the error-handling pathway for usb-storage. Hence its allocation type is changed to GFO_NOIO. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r--drivers/usb/core/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index c311f67..a3695b5 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -784,7 +784,7 @@ int usb_string(struct usb_device *dev, int index, char *buf, size_t size)
if (size <= 0 || !buf || !index)
return -EINVAL;
buf[0] = 0;
- tbuf = kmalloc(256, GFP_KERNEL);
+ tbuf = kmalloc(256, GFP_NOIO);
if (!tbuf)
return -ENOMEM;