From oliver@neukum.org Fri Jan 11 14:29:28 2008 From: Oliver Neukum Date: Thu, 10 Jan 2008 10:31:48 +0100 Subject: USB: use GFP_NOIO in reset path To: greg@kroah.com, linux-usb@vger.kernel.org Message-ID: <200801101031.49369.oliver@neukum.org> Content-Disposition: inline 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 --- drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2946,7 +2946,7 @@ static int config_descriptors_changed(st 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 */