Re: [PATCH] - Fix memory ordering problem in wake_futex()

From: Manfred Spraul
Date: Sun Dec 25 2005 - 11:02:00 EST


Again replying to myself, sorry:

Jack Steiner wrote:

On Fri, Dec 23, 2005 at 11:23:11PM +0100, Manfred Spraul wrote:


Bad race.
Unfortuantely the scenario that you describe is quite frequent:
- autoremove_wake_function()


Not a bug, but for very subtile reasons:
There are no writes to the wait_queue structure except the list_del_init(), and for list_del_init() no memory barriers are required because finish_wait() uses list_empty_careful(), i.e. the spin_lock() is only bypassed if both write operations from list_del_init() have completed.

- ipc/sem.c (search for IN_WAKEUP)


fixed in -rc7.


--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/