USB: storage: fix a resume path GFP_NOIO must be used
authorOliver Neukum <oliver@neukum.org>
Wed, 26 Aug 2009 17:56:12 +0000 (19:56 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Sep 2009 13:46:15 +0000 (06:46 -0700)
In the resume path of a block driver GFP_NOIO must be used to
avoid a possible deadlock. The onetouch subdriver of storage violates
the requirement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/onetouch.c

index 380233bd6a393c3522655922297849fa346f3f7a..80e65f29921cbed01c80406dddbe838feac5d11a 100644 (file)
@@ -163,7 +163,7 @@ static void usb_onetouch_pm_hook(struct us_data *us, int action)
                        usb_kill_urb(onetouch->irq);
                        break;
                case US_RESUME:
-                       if (usb_submit_urb(onetouch->irq, GFP_KERNEL) != 0)
+                       if (usb_submit_urb(onetouch->irq, GFP_NOIO) != 0)
                                dev_err(&onetouch->irq->dev->dev,
                                        "usb_submit_urb failed\n");
                        break;