projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sched: rename idle_type/SCHED_IDLE
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
futex_compat.c
diff --git
a/kernel/futex_compat.c
b/kernel/futex_compat.c
index 338a9b489fbc34fc2ca2ceeecd19f44f2889dd21..f7921360efadec4d6b2e44b85adc76a19752de87 100644
(file)
--- a/
kernel/futex_compat.c
+++ b/
kernel/futex_compat.c
@@
-144,20
+144,20
@@
asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
struct timespec ts;
ktime_t t, *tp = NULL;
int val2 = 0;
struct timespec ts;
ktime_t t, *tp = NULL;
int val2 = 0;
+ int cmd = op & FUTEX_CMD_MASK;
- if (utime && (
op == FUTEX_WAIT || op
== FUTEX_LOCK_PI)) {
+ if (utime && (
cmd == FUTEX_WAIT || cmd
== FUTEX_LOCK_PI)) {
if (get_compat_timespec(&ts, utime))
return -EFAULT;
if (!timespec_valid(&ts))
return -EINVAL;
t = timespec_to_ktime(ts);
if (get_compat_timespec(&ts, utime))
return -EFAULT;
if (!timespec_valid(&ts))
return -EINVAL;
t = timespec_to_ktime(ts);
- if (
op
== FUTEX_WAIT)
+ if (
cmd
== FUTEX_WAIT)
t = ktime_add(ktime_get(), t);
tp = &t;
}
t = ktime_add(ktime_get(), t);
tp = &t;
}
- if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE
- || op == FUTEX_CMP_REQUEUE_PI)
+ if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE)
val2 = (int) (unsigned long) utime;
return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);
val2 = (int) (unsigned long) utime;
return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);