2.4.36-stable kernel tree
Revision | c46296338fd99b419e501384e82e87fae9a9be5a (tree) |
---|---|
Zeit | 2006-12-05 17:29:38 |
Autor | Oliver Neukum <oliver@neuk...> |
Commiter | Willy Tarreau |
[PATCH] task stte leak in pegasus usb driver
Hi,
this is a conservative port of a 2.6 fix for the pegasus driver which leaks
TASK_UNINTERRUPTIBLE in error cases. In case of an error the state
needs to be reset to TASK_RUNNING.
Regards
Oliver
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Acked-by: Petko Manolov <petkan@nucleusys.com>
@@ -147,6 +147,7 @@ static int get_registers(pegasus_t * pegasus, u16 indx, u16 size, | ||
147 | 147 | set_current_state(TASK_UNINTERRUPTIBLE); |
148 | 148 | |
149 | 149 | if ((ret = usb_submit_urb(pegasus->ctrl_urb))) { |
150 | + set_current_state(TASK_RUNNING); | |
150 | 151 | err("%s: BAD CTRLs %d", __FUNCTION__, ret); |
151 | 152 | goto out; |
152 | 153 | } |
@@ -197,6 +198,7 @@ static int set_registers(pegasus_t * pegasus, u16 indx, u16 size, | ||
197 | 198 | set_current_state(TASK_UNINTERRUPTIBLE); |
198 | 199 | |
199 | 200 | if ((ret = usb_submit_urb(pegasus->ctrl_urb))) { |
201 | + set_current_state(TASK_RUNNING); | |
200 | 202 | err("%s: BAD CTRL %d", __FUNCTION__, ret); |
201 | 203 | goto out; |
202 | 204 | } |
@@ -244,6 +246,7 @@ static int set_register(pegasus_t * pegasus, u16 indx, u8 data) | ||
244 | 246 | set_current_state(TASK_UNINTERRUPTIBLE); |
245 | 247 | |
246 | 248 | if ((ret = usb_submit_urb(pegasus->ctrl_urb))) { |
249 | + set_current_state(TASK_RUNNING); | |
247 | 250 | err("%s: BAD CTRL %d", __FUNCTION__, ret); |
248 | 251 | goto out; |
249 | 252 | } |