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:42:59 +0000 (16:42 -0400)
commitdce89628fd85a875a8dc511d861057f218f3c1c8
tree688bcbdc45f3b199e76e5d442292302d9a7be06f
parentd53ea4e443912f7b3fe89da38e3374db2a1a3bf8
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.031013 seconds and 4 git commands to generate.