diff options
author | Andreas Schwab <schwab@suse.de> | 2007-07-31 03:38:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 18:39:40 -0400 |
commit | f54f098612d7f86463b5fb4763d03533d634de73 (patch) | |
tree | 22c18dd521e6a182647ad8304ab28434060f0c8c | |
parent | c0f3358621dc746219d49a9dee1799704d3a32f8 (diff) |
futex: pass nr_wake2 to futex_wake_op
The fourth argument of sys_futex is ignored when op == FUTEX_WAKE_OP,
but futex_wake_op expects it as its nr_wake2 parameter.
The only user of this operation in glibc is always passing 1, so this
bug had no consequences so far.
Signed-off-by: Andreas Schwab <schwab@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/futex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index a12425051ee9..3415e9ad1391 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -2060,8 +2060,10 @@ asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, | |||
2060 | } | 2060 | } |
2061 | /* | 2061 | /* |
2062 | * requeue parameter in 'utime' if cmd == FUTEX_REQUEUE. | 2062 | * requeue parameter in 'utime' if cmd == FUTEX_REQUEUE. |
2063 | * number of waiters to wake in 'utime' if cmd == FUTEX_WAKE_OP. | ||
2063 | */ | 2064 | */ |
2064 | if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE) | 2065 | if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE || |
2066 | cmd == FUTEX_WAKE_OP) | ||
2065 | val2 = (u32) (unsigned long) utime; | 2067 | val2 = (u32) (unsigned long) utime; |
2066 | 2068 | ||
2067 | return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); | 2069 | return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); |