From: Steven Rostedt Date: Mon, 10 Oct 2005 15:13:17 +0000 (-0400) Subject: [PATCH] pcmcia: fix task state at pccard thread exit X-Git-Tag: v2.6.14-rc4~21 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=220ec0291130a932b32b2c66a10e9c5019dab702;p=linux-2.6-omap-h63xx.git [PATCH] pcmcia: fix task state at pccard thread exit 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index fabd3529ceb..d5e76423a0e 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -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 */