]> err.no Git - linux-2.6/commitdiff
USB: pegasus error path not resetting task's state
authorOliver Neukum <oliver@neukum.name>
Thu, 23 Nov 2006 14:40:17 +0000 (15:40 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:25:51 +0000 (14:25 -0800)
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 <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/net/pegasus.c

index 33abbd2176b63f27cd8cea5b28b419fedd202f6c..69eb0db399df09f1c4ff5cb5dc9ec92d03974412 100644 (file)
@@ -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))