Skip to content

Commit

Permalink
[PATCH] pcmcia: fix task state at pccard thread exit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rostedt authored and Linus Torvalds committed Oct 10, 2005
1 parent 2e457ef commit 220ec02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/pcmcia/cs.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 220ec02

Please sign in to comment.