diff options
author | Len Brown <len.brown@intel.com> | 2006-06-30 01:57:46 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-30 01:57:46 +0200 |
commit | d120cfb544ed6161b9d32fb6c4648c471807ee6b (patch) | |
tree | 7757ad0198d8df76ff5c60f939a687687c41da00 /kernel/futex_compat.c | |
parent | Pull acpica into release branch (diff) | |
parent | [PATCH] usb gadget: fixup pxa2xx_udc to include asm/arch/udc.h again (diff) | |
download | linux-d120cfb544ed6161b9d32fb6c4648c471807ee6b.tar.xz linux-d120cfb544ed6161b9d32fb6c4648c471807ee6b.zip |
merge linus into release branch
Conflicts:
drivers/acpi/acpi_memhotplug.c
Diffstat (limited to 'kernel/futex_compat.c')
-rw-r--r-- | kernel/futex_compat.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c index 1ab6a0ea3d14..d1d92b441fb7 100644 --- a/kernel/futex_compat.c +++ b/kernel/futex_compat.c @@ -129,16 +129,20 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout = MAX_SCHEDULE_TIMEOUT; int val2 = 0; - if (utime && (op == FUTEX_WAIT)) { + if (utime && (op == FUTEX_WAIT || op == FUTEX_LOCK_PI)) { if (get_compat_timespec(&t, utime)) return -EFAULT; if (!timespec_valid(&t)) return -EINVAL; - timeout = timespec_to_jiffies(&t) + 1; + if (op == FUTEX_WAIT) + timeout = timespec_to_jiffies(&t) + 1; + else { + timeout = t.tv_sec; + val2 = t.tv_nsec; + } } - if (op >= FUTEX_REQUEUE) + if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE) val2 = (int) (unsigned long) utime; - return do_futex((unsigned long)uaddr, op, val, timeout, - (unsigned long)uaddr2, val2, val3); + return do_futex(uaddr, op, val, timeout, uaddr2, val2, val3); } |