Re: [PATCH] Fix a race in pid generation that causes pids to be reused immediately.

Paul Mackerras
2010-06-15T03:26:18Z

On Mon, Jun 14, 2010 at 06:55:56PM -0700, Andrew Morton wrote:

> > kernel/sched_clock.c: if (cmpxchg64(&scd->clock, old_clock, clock) != old_cloc
>
> I guess that'll flush out any stragglers.

And break most non-x86 32-bit architectures, including 32-bit powerpc.
Fortunately that code is only used if CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
is set, and it looks like only x86 and ia64 set it.

Paul.