futex: fix compat_futex to be same as futex for REQUEUE_PI
PATCH 1/1 futex: fix compat_futex to be same as futex for REQUEUE_PI
From: Dinakar Guniguntala <[email protected]>
Need to add the REQUEUE_PI checks to the compat_sys_futex API as well to ensure 32 bit requeue's work fine on a 64 bit system.
Patch is against latest tip
Signed-off-by Dinakar Guniguntala <[email protected]>
CC Darren Hart <[email protected]>
-Dinakar
futex_compat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
kernel/futex_compat.c +4 -2
@@ -180,7 +180,8 @@ asmlinkage long compat_sys_futex(u32 __uint cmd = op &FUTEX_CMD_MASK ;if (utime && (cmd ==FUTEX_WAIT || cmd ==FUTEX_LOCK_PI || - cmd ==FUTEX_WAIT_BITSET )) { + cmd ==FUTEX_WAIT_BITSET || + cmd ==FUTEX_WAIT_REQUEUE_PI )) {if (get_compat_timespec (&ts, utime))return -EFAULT ;if (!timespec_valid (&ts))
@@ -191,7 +192,8 @@ asmlinkage long compat_sys_futex(u32 __u t =ktime_add_safe (ktime_get (), t); tp = &t; } -if (cmd ==FUTEX_REQUEUE || cmd ==FUTEX_CMP_REQUEUE ) +if (cmd ==FUTEX_REQUEUE || cmd ==FUTEX_CMP_REQUEUE || + cmd ==FUTEX_CMP_REQUEUE_PI || cmd ==FUTEX_WAKE_OP ) val2 = (int ) (unsigned long ) utime;return do_futex (uaddr, op, val, tp, uaddr2, val2, val3);
[tip:core/urgent] futex: Fix compat_futex to be same as futex for REQUEUE_PI
Commit-ID: 4dc88029fd916b860ef063c40180aa604ce93494 Gitweb: http://git.kernel.org/tip/4dc88029fd916b860ef063c40180aa604ce93494 Author: Dinakar Guniguntala <[email protected]> AuthorDate: Mon, 10 Aug 2009 18:31:42 +0530 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 10 Aug 2009 15:41:12 +0200
futex: Fix compat_futex to be same as futex for REQUEUE_PI
Need to add the REQUEUE_PI checks to the compat_sys_futex API as well to ensure 32 bit requeue's work fine on a 64 bit system. Patch is against latest tip
Signed-off-by Dinakar Guniguntala <[email protected]>
Cc Darren Hart <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/futex_compat.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
kernel/futex_compat.c +4 -2
@@ -180,7 +180,8 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,int cmd = op &FUTEX_CMD_MASK ;if (utime && (cmd ==FUTEX_WAIT || cmd ==FUTEX_LOCK_PI || - cmd ==FUTEX_WAIT_BITSET )) { + cmd ==FUTEX_WAIT_BITSET || + cmd ==FUTEX_WAIT_REQUEUE_PI )) {if (get_compat_timespec (&ts, utime))return -EFAULT ;if (!timespec_valid (&ts))
@@ -191,7 +192,8 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val, t =ktime_add_safe (ktime_get (), t); tp = &t; } -if (cmd ==FUTEX_REQUEUE || cmd ==FUTEX_CMP_REQUEUE ) +if (cmd ==FUTEX_REQUEUE || cmd ==FUTEX_CMP_REQUEUE || + cmd ==FUTEX_CMP_REQUEUE_PI || cmd ==FUTEX_WAKE_OP ) val2 = (int ) (unsigned long ) utime;return do_futex (uaddr, op, val, tp, uaddr2, val2, val3);