summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2023-02-19 14:22:17 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2023-02-19 14:22:38 +0100
commit481356761e1cb231891431984fe78ae5008226d1 (patch)
tree91a23c90494081fc8bafbcaf361253239038252f /target
parente9bdfe72927eb5e286ad1797d4afa81c82773f80 (diff)
avr32: fix 4.4.302 kernel boot
Diffstat (limited to 'target')
-rw-r--r--target/avr32/patches/4.4.302/revert-futex.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/avr32/patches/4.4.302/revert-futex.patch b/target/avr32/patches/4.4.302/revert-futex.patch
new file mode 100644
index 000000000..dd0e5c23a
--- /dev/null
+++ b/target/avr32/patches/4.4.302/revert-futex.patch
@@ -0,0 +1,22 @@
+diff -Nur linux-4.4.302.orig/kernel/futex.c linux-4.4.302/kernel/futex.c
+--- linux-4.4.302.orig/kernel/futex.c 2022-02-03 09:27:54.000000000 +0100
++++ linux-4.4.302/kernel/futex.c 2023-02-19 14:03:07.727035123 +0100
+@@ -1701,16 +1701,8 @@
+ int oldval, ret;
+
+ if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) {
+- 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;
+- }
++ if (oparg < 0 || oparg > 31)
++ return -EINVAL;
+ oparg = 1 << oparg;
+ }
+