Re: [patch] proposed fix for ptrace() SMP race

From: Andrea Arcangeli (andrea@suse.de)
Date: Fri Sep 07 2001 - 08:34:25 EST


On Fri, Sep 07, 2001 at 02:41:11AM +0100, Alan Cox wrote:
> > +#ifdef CONFIG_SMP
> > + rmb(); /* read child->has_cpu after child->state */
> > + while (child->has_cpu);
> rep_nop();
>
> otherwise your PIV will overheat

indeed correct (OTOH it's a so small window [not like a contended
spinlock] that I wonder if it will make a difference in real life ;)

Andrea
-
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 : Fri Sep 07 2001 - 21:00:41 EST