summaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorDavid S. Miller2017-11-04 01:26:51 +0100
committerDavid S. Miller2017-11-04 01:26:51 +0100
commit2a171788ba7bb61995e98e8163204fc7880f63b2 (patch)
tree4150a94dd08323748116e5051e56ddee830d4812 /kernel/futex.c
parentliquidio: Fix an issue with multiple switchdev enable disables (diff)
parentMerge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadkernel-qcow2-linux-2a171788ba7bb61995e98e8163204fc7880f63b2.tar.gz
kernel-qcow2-linux-2a171788ba7bb61995e98e8163204fc7880f63b2.tar.xz
kernel-qcow2-linux-2a171788ba7bb61995e98e8163204fc7880f63b2.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Files removed in 'net-next' had their license header updated in 'net'. We take the remove from 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
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 0518a0bfc746..0d638f008bb1 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1570,8 +1570,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;
}