Fix: futex can be free'd while used by waker thread
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 10 May 2017 19:36:23 +0000 (15:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 10 May 2017 20:56:23 +0000 (16:56 -0400)
commit01861ac95269b8de38b77263d780c23139ff181a
treee1044ba00bff5f9526293221b253600473d36385
parent44f2d7dbf1db6469644b820789583c5c56dbaca1
Fix: futex can be free'd while used by waker thread

The futex_nto1 utils assume that the futex it operates on
has a program-long lifetime (or that is is protected by a
third-party).

The notification command system uses a futex allocated on the
waiter's stack. However, the waiter could never enter the
futex() syscall (due to of the opportunist check before the futex
call). In this case, the waiter's stack-allocated futex becomes
invalid, but will be used by the waker to perform the FUTEX_WAKE
operation.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/futex.c
This page took 0.025092 seconds and 4 git commands to generate.