summaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-04 08:53:04 +0100
committerIngo Molnar <mingo@kernel.org>2017-11-04 08:53:04 +0100
commit649e441f49d4bfb717e9467950891dc452f4e063 (patch)
tree2bdfdca65519db2f350c236cbbd65f24d5746cad /kernel/futex.c
parentwatchdog/hardlockup/perf: Use atomics to track in-use cpu counter (diff)
parentKbuild: don't pass "-C" to preprocessor when processing linker scripts (diff)
downloadlinux-649e441f49d4bfb717e9467950891dc452f4e063.tar.xz
linux-649e441f49d4bfb717e9467950891dc452f4e063.zip
Merge branch 'linus' into core/urgent, to pick up dependent commits
We want to fix an objtool build warning that got introduced in the latest upstream kernel. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index ca5bb9cba5cf..76ed5921117a 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1587,8 +1587,16 @@ static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)
int oldval, ret;
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) {
- if (oparg < 0 || oparg > 31)
- return -EINVAL;
+ if (oparg < 0 || oparg > 31) {
+ char comm[sizeof(current->comm)];
+ /*
+ * kill this print and return -EINVAL when userspace
+ * is sane again
+ */
+ pr_info_ratelimited("futex_wake_op: %s tries to shift op by %d; fix this program\n",
+ get_task_comm(comm, current), oparg);
+ oparg &= 31;
+ }
oparg = 1 << oparg;
}