From: Oliver Neukum Date: Thu, 10 Jan 2008 09:31:48 +0000 (+0100) Subject: USB: use GFP_NOIO in reset path X-Git-Tag: v2.6.25-rc1~1075^2~113 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0cc1a51ff32cd54881a7e4d92ed89cee49843265;p=linux-2.6-omap-h63xx.git USB: use GFP_NOIO in reset path 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 Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index b04d232d4c6..1b17f636f49 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -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 */