Skip to content

Commit

Permalink
USB: pegasus error path not resetting task's state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Dec 1, 2006
1 parent 9aa742e commit 10c8211
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/net/pegasus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 10c8211

Please sign in to comment.