diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2015-10-08 11:17:59 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2015-12-15 14:39:49 +0100 |
| commit | ee65b0e84277884baf32ce32e14b9742b88553ef (patch) | |
| tree | 1d82b8758c00f9b9a10cc6b043520770ca27b005 /man2/futex.2 | |
| parent | c3f4c0196abf0832e19377cc4af95c226b8cc1a0 (diff) | |
| download | man-pages-ee65b0e84277884baf32ce32e14b9742b88553ef.tar.gz | |
futex.2: srcfix (notes from conversation with tglx)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2/futex.2')
| -rw-r--r-- | man2/futex.2 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/man2/futex.2 b/man2/futex.2 index 630448e2e0..8185a3126d 100644 --- a/man2/futex.2 +++ b/man2/futex.2 @@ -434,6 +434,11 @@ This load, the comparison with .IR val3 , and the requeueing of any waiters are performed atomically and totally ordered with respect to other operations on the same futex word. +.\" Notes from a f2f conversation with Thomas Gleixner (Aug 2015): ### +.\" The operation is serialized with respect to operations on both +.\" source and target futex. No other waiter can enqueue itself +.\" for waiting and no other waiter can dequeue itself because of +.\" a timeout or signal. Typical values to specify for .I val @@ -1055,6 +1060,16 @@ This can happen when the owner of the futex died. .\" User space cannot handle this condition in a race-free manner, but the kernel can fix this up and acquire the futex. +.\" Paraphrasing a f2f conversation with Thomas Gleixner about the +.\" above point (Aug 2015): ### +.\" There is a rare possibility of a race condition involving an +.\" uncontended futex with no owner, but with waiters. The +.\" kernel-user-space contract is that if a futex is nonzero, you must +.\" go into kernel. The futex was owned by a task, and that task dies +.\" but there are no waiters, so the futex value is non zero. +.\" Therefore, the next locker has to go into the kernel, +.\" so that the kernel has a chance to clean up. (CMXCH on zero +.\" in user space would fail, so kernel has to clean up.) The .IR uaddr2 , @@ -1465,6 +1480,9 @@ or The kernel detected an inconsistency between the user-space state at .I uaddr2 and the kernel state; +.\" From a conversation with Thomas Gleixner (Aug 2015): ### +.\" The kernel sees: I have non PI state for a futex you tried to +.\" tell me was PI that is, the kernel detected a waiter which waits via .BR FUTEX_WAIT or |
