Re: [patch] scheduler fixes, 2.5.32-BK

Andrew Morton (akpm@zip.com.au)
Fri, 30 Aug 2002 01:12:38 -0700


Ingo Molnar wrote:
>
> > - changes the migration code to use struct completion. Andrew pointed out
> > that there might be a small window in where the up() touches the
> > semaphore while the waiting task goes on and frees its stack. And
> > completion is more suited for this kind of stuff anyway.
>
> actually, i think the race does not exist. up() is perfectly safely done
> on the on-stack semaphore, because both the wake_up() done by __up() and
> the __down() path takes the waitqueue spinlock, so i cannot see where the
> up() touches the semaphore after the down()-ed task has been woken up.
>

yep, looks like the killing of the semaphore_lock made the race
go away.

But ia64, sparc and x86_64 use semaphore_lock, so they still are
exposed.
-
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/