lkml.org 
[lkml]   [2005]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] pcmcia-shutdown-fix.patch

* Steven Rostedt <rostedt@goodmis.org> wrote:

> Ingo, here's the patch. This should probably go upstream too since it
> can happen there too. The pccardd thread has a race in it that it can
> shutdown in the TASK_INTERRUPTIBLE state. Here's the fix.

ah, certainly makes sense. Dominik, does it look good to you too? Patch
below is for upstream.

Ingo

----

The pccardd thread has a race in it that it can shutdown in the
TASK_INTERRUPTIBLE state. Found on the -rt kernel.

From: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

--

drivers/pcmcia/cs.c | 3 +++
1 files changed, 3 insertions(+)

Index: linux/drivers/pcmcia/cs.c
===================================================================
--- linux.orig/drivers/pcmcia/cs.c
+++ linux/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 */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-10-07 13:12    [W:0.152 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site