瀏覽代碼

[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 <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Steven Rostedt 19 年之前
父節點
當前提交
220ec02911
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/pcmcia/cs.c

+ 3 - 0
drivers/pcmcia/cs.c

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