summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2014-03-28 06:25:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-16 17:04:59 -0400
commit94d72f008909610710bb1841d665eeeb010a0be1 (patch)
tree772ca72840bc75d3a33802a56fb4dcfc526d2951 /drivers/usb
parentc637f1fa7b0452b71eebd35d00906d371c04714e (diff)
uas: fix deadlocky memory allocations
There are also two allocations with GFP_KERNEL in the pre-/post_reset code paths. That is no good because that is a part of the SCSI error handler. Signed-off-by: Oliver Neukum <oliver@neukum.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/storage/uas.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index fcab9b79d9fb..511b22953167 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -1030,7 +1030,7 @@ static int uas_configure_endpoints(struct uas_dev_info *devinfo)
1030 devinfo->use_streams = 0; 1030 devinfo->use_streams = 0;
1031 } else { 1031 } else {
1032 devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1, 1032 devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1,
1033 3, 256, GFP_KERNEL); 1033 3, 256, GFP_NOIO);
1034 if (devinfo->qdepth < 0) 1034 if (devinfo->qdepth < 0)
1035 return devinfo->qdepth; 1035 return devinfo->qdepth;
1036 devinfo->use_streams = 1; 1036 devinfo->use_streams = 1;
@@ -1047,7 +1047,7 @@ static void uas_free_streams(struct uas_dev_info *devinfo)
1047 eps[0] = usb_pipe_endpoint(udev, devinfo->status_pipe); 1047 eps[0] = usb_pipe_endpoint(udev, devinfo->status_pipe);
1048 eps[1] = usb_pipe_endpoint(udev, devinfo->data_in_pipe); 1048 eps[1] = usb_pipe_endpoint(udev, devinfo->data_in_pipe);
1049 eps[2] = usb_pipe_endpoint(udev, devinfo->data_out_pipe); 1049 eps[2] = usb_pipe_endpoint(udev, devinfo->data_out_pipe);
1050 usb_free_streams(devinfo->intf, eps, 3, GFP_KERNEL); 1050 usb_free_streams(devinfo->intf, eps, 3, GFP_NOIO);
1051} 1051}
1052 1052
1053static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id) 1053static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id)