From: Oliver Neukum Date: Thu, 23 Nov 2006 14:40:17 +0000 (+0100) Subject: USB: pegasus error path not resetting task's state X-Git-Tag: v2.6.20-rc1~34^2~40^2~472^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10c8211c634f759633ffcdc3b0e2913963b32abc;p=linux-2.6 USB: pegasus error path not resetting task's state there is an error path in the pegasus driver which can leave the task in TASK_UNINTERRUPTIBLE. Depending on when it schedules next, this can be bad. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c index 33abbd2176..69eb0db399 100644 --- a/drivers/usb/net/pegasus.c +++ b/drivers/usb/net/pegasus.c @@ -163,6 +163,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, /* using ATOMIC, we'd never wake up if we slept */ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { + set_current_state(TASK_RUNNING); if (ret == -ENODEV) netif_device_detach(pegasus->net); if (netif_msg_drv(pegasus))