Skip to content

Commit 26c369d

Browse files
Matt Helsleytorvalds
Matt Helsley
authored andcommitted
futex: documentation: fix inconsistent description of futex list_op_pending
Strictly speaking list_op_pending points to the 'lock entry', not the 'lock word' (which is actually at 'offset' from 'lock entry'). We can infer this based on reading the code in kernel/futex.c: struct robust_list __user *entry, *next_entry, *pending; ... if (fetch_robust_entry(&pending, &head->list_op_pending, &pip)) return; ... if (pending) handle_futex_death((void __user *)pending + futex_offset, curr, pip); Which is also consistent with the rest of the docs on robust futex lists. Signed-off-by: Matt Helsley <matthltc@us.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Thomas Gleixner <tglx@linuxtronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 665c774 commit 26c369d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/robust-futex-ABI.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ manipulating this list), the user code must observe the following
135135
protocol on 'lock entry' insertion and removal:
136136

137137
On insertion:
138-
1) set the 'list_op_pending' word to the address of the 'lock word'
138+
1) set the 'list_op_pending' word to the address of the 'lock entry'
139139
to be inserted,
140140
2) acquire the futex lock,
141141
3) add the lock entry, with its thread id (TID) in the bottom 29 bits
142142
of the 'lock word', to the linked list starting at 'head', and
143143
4) clear the 'list_op_pending' word.
144144

145145
On removal:
146-
1) set the 'list_op_pending' word to the address of the 'lock word'
146+
1) set the 'list_op_pending' word to the address of the 'lock entry'
147147
to be removed,
148148
2) remove the lock entry for this lock from the 'head' list,
149149
2) release the futex lock, and

0 commit comments

Comments
 (0)