diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-03-03 15:16:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-24 21:16:33 -0700 |
commit | eb764c4be1e5db3ee34df5745e98cf2f148c7320 (patch) | |
tree | f434cf49540ab6ea2c7fae6490a693916c2e5501 /drivers/usb/core/message.c | |
parent | feccc30d90155bcbc937f87643182a43d25873eb (diff) | |
download | kernel_samsung_smdk4412-eb764c4be1e5db3ee34df5745e98cf2f148c7320.zip kernel_samsung_smdk4412-eb764c4be1e5db3ee34df5745e98cf2f148c7320.tar.gz kernel_samsung_smdk4412-eb764c4be1e5db3ee34df5745e98cf2f148c7320.tar.bz2 |
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.c | 2 |
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; |