]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: use GFP_NOIO in reset path
authorOliver Neukum <oliver@neukum.org>
Thu, 10 Jan 2008 09:31:48 +0000 (10:31 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 22:34:45 +0000 (14:34 -0800)
this function will run in the context of the scsi error handler thread.
It must use GFP_NOIO instead of GFP_KERNEL to avoid a possible
deadlock.

Cc: stable <stable@kernel.org>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c

index b04d232d4c6561720f219ff506fcd2a35a9c0caf..1b17f636f49c78e13109a6dd747bec6446fd5533 100644 (file)
@@ -2946,7 +2946,7 @@ static int config_descriptors_changed(struct usb_device *udev)
                if (len < le16_to_cpu(udev->config[index].desc.wTotalLength))
                        len = le16_to_cpu(udev->config[index].desc.wTotalLength);
        }
-       buf = kmalloc (len, GFP_KERNEL);
+       buf = kmalloc(len, GFP_NOIO);
        if (buf == NULL) {
                dev_err(&udev->dev, "no mem to re-read configs after reset\n");
                /* assume the worst */