diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-04 08:53:04 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-04 08:53:04 +0100 |
commit | 649e441f49d4bfb717e9467950891dc452f4e063 (patch) | |
tree | 2bdfdca65519db2f350c236cbbd65f24d5746cad /kernel/futex.c | |
parent | 42f930da7f00c0ab23df4c7aed36137f35988980 (diff) | |
parent | 5cb0512c02ecd7e6214e912e4c150f4219ac78e0 (diff) | |
download | linux-649e441f49d4bfb717e9467950891dc452f4e063.tar.bz2 |
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.c | 12 |
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; } |