diff options
Diffstat (limited to 'kernel/futex_compat.c')
| -rw-r--r-- | kernel/futex_compat.c | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c index 54274fc85321..1ab6a0ea3d14 100644 --- a/kernel/futex_compat.c +++ b/kernel/futex_compat.c  | |||
| @@ -129,9 +129,11 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val, | |||
| 129 | unsigned long timeout = MAX_SCHEDULE_TIMEOUT; | 129 | unsigned long timeout = MAX_SCHEDULE_TIMEOUT; | 
| 130 | int val2 = 0; | 130 | int val2 = 0; | 
| 131 | 131 | ||
| 132 | if ((op == FUTEX_WAIT) && utime) { | 132 | if (utime && (op == FUTEX_WAIT)) { | 
| 133 | if (get_compat_timespec(&t, utime)) | 133 | if (get_compat_timespec(&t, utime)) | 
| 134 | return -EFAULT; | 134 | return -EFAULT; | 
| 135 | if (!timespec_valid(&t)) | ||
| 136 | return -EINVAL; | ||
| 135 | timeout = timespec_to_jiffies(&t) + 1; | 137 | timeout = timespec_to_jiffies(&t) + 1; | 
| 136 | } | 138 | } | 
| 137 | if (op >= FUTEX_REQUEUE) | 139 | if (op >= FUTEX_REQUEUE) | 
