[patch] pcmcia-shutdown-fix.patch

Steven Rostedt rostedt at goodmis.org
Mon Oct 10 11:37:42 EDT 2005



On Mon, 10 Oct 2005, Steven Rostedt wrote:

>
> On Fri, 7 Oct 2005, Russell King wrote:
>
> > On Fri, Oct 07, 2005 at 01:09:14PM +0200, Ingo Molnar wrote:
> > >
> > > * Steven Rostedt <rostedt at 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.
> >
> > Looks correct to me (I'm the author of this code.)  Since it's
> > a bug fix, please send it upstream ASAP.
> >
>
> Just in case this was missed and hasn't been incorporated.  Here's the
> patch once again:
>

Oh, and I forgot to add the write-up that Ingo did to explain the patch.

----

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

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


> -- Steve
>
> Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
>
> Index: linux-2.6.14-rc3/drivers/pcmcia/cs.c
> ===================================================================
> --- linux-2.6.14-rc3/drivers/pcmcia/cs.c.orig	2005-10-06 06:56:17.000000000 -0400
> +++ linux-2.6.14-rc3/drivers/pcmcia/cs.c	2005-10-10 11:05:09.000000000 -0400
> @@ -689,6 +689,9 @@
>  		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 at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



More information about the linux-pcmcia mailing list