pi-futex: set PF_EXITING without taking ->pi_lock
commitd2ee7198cc2414aade234a3cebc69e6cbff35d9b
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 17 Oct 2007 06:26:47 +0000 (16 23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:51 +0000 (17 08:42 -0700)
treee89d52b8b64f6eb675add025ba8507863e4bc0f8
parent7917ff9a4cefd0500aa4a1b1942da96dbce6999f
pi-futex: set PF_EXITING without taking ->pi_lock

It is a bit annoying that do_exit() takes ->pi_lock to set PF_EXITING.  All
we need is to synchronize with lookup_pi_state() which saw this task
without PF_EXITING under ->pi_lock.

Change do_exit() to use spin_unlock_wait().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/exit.c