From 220ec0291130a932b32b2c66a10e9c5019dab702 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Mon, 10 Oct 2005 11:13:17 -0400 Subject: [PATCH] [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 --- drivers/pcmcia/cs.c | 3 +++ 1 file changed, 3 insertions(+) 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 */ -- 2.20.1