2006-02-16 17:43:04

by Daniel Walker

[permalink] [raw]
Subject: [PATCH] FUTEX: one more return .

Signed-Off-By: Daniel Walker <[email protected]>


Continue the theme of returns .

Index: linux-2.6.15/kernel/futex.c
===================================================================
--- linux-2.6.15.orig/kernel/futex.c
+++ linux-2.6.15/kernel/futex.c
@@ -973,8 +973,10 @@ void exit_robust_list(struct task_struct
*/
if (get_user(pending, &head->list_op_pending))
return;
- if (pending)
- handle_futex_death((void *)pending + futex_offset, curr);
+ if (pending) {
+ if (handle_futex_death((void *)pending + futex_offset, curr))
+ return;
+ }

while (entry != &head->list) {
/*


2006-02-16 18:11:17

by Ulrich Drepper

[permalink] [raw]
Subject: Re: [PATCH] FUTEX: one more return .

On 2/16/06, Daniel Walker <[email protected]> wrote:
> Continue the theme of returns .

No, that's wrong. I got Ingo to remove this code and he documented it:

=====
- race fix: do not bail out in the list walk when the list_op_pending
pointer cannot be followed by the kernel - another userspace thread
may have already destroyed the mutex (and unmapped it), before this
thread had a chance to clear the field.
=====

2006-02-16 19:15:55

by Daniel Walker

[permalink] [raw]
Subject: Re: [PATCH] FUTEX: one more return .


Ok ..


On Thu, 16 Feb 2006, Ulrich Drepper wrote:

> On 2/16/06, Daniel Walker <[email protected]> wrote:
>> Continue the theme of returns .
>
> No, that's wrong. I got Ingo to remove this code and he documented it:
>
> =====
> - race fix: do not bail out in the list walk when the list_op_pending
> pointer cannot be followed by the kernel - another userspace thread
> may have already destroyed the mutex (and unmapped it), before this
> thread had a chance to clear the field.
> =====
>