]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] pcmcia: fix task state at pccard thread exit
authorSteven Rostedt <rostedt@goodmis.org>
Mon, 10 Oct 2005 15:13:17 +0000 (11:13 -0400)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Oct 2005 15:33:27 +0000 (08:33 -0700)
The pccardd thread has a race in it that it can shutdown in the
TASK_INTERRUPTIBLE state.

Make sure we mark ourselves runnable again as we remove ourselves from
the wait queue.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/pcmcia/cs.c

index fabd3529cebcb035e56769354986c99e561ecb08..d5e76423a0ee89b15a3888e0b411f688e49b05fb 100644 (file)
@@ -689,6 +689,9 @@ static int pccardd(void *__skt)
                schedule();
                try_to_freeze();
        }
+       /* make sure we are running before we exit */
+       set_current_state(TASK_RUNNING);
+
        remove_wait_queue(&skt->thread_wait, &wait);
 
        /* remove from the device core */