Re: [PATCH] set_cpus_allowed() atomicity fix

From: Robert Love (rml@tech9.net)
Date: Wed Oct 09 2002 - 20:05:17 EST


On Wed, 2002-10-09 at 19:17, Linus Torvalds wrote:

> On 9 Oct 2002, Robert Love wrote:
> >
> > Anyhow, attached patch fixes the atomicity debugging error.
>
> I don't think this is right. You have to be preempt safe over the whole
> time you're holding the "rq" pointer, I think. Otherwise you might move to
> another CPU, at which point the rq state isn't valid any more. Or maybe I
> misunderstood.

I agree. But aren't we?

We are preempt-safe through the entire function (starting at the top
with task_rq_lock()) until the preempt_disable(). The only instruction
outside of the critical section is the wait_for_completion() which
sleeps anyhow.

Or maybe _I_ misunderstood?

        Robert Love

-
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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:35 EST