revert-futex.patch 712 B

12345678910111213141516171819202122
  1. diff -Nur linux-4.4.302.orig/kernel/futex.c linux-4.4.302/kernel/futex.c
  2. --- linux-4.4.302.orig/kernel/futex.c 2022-02-03 09:27:54.000000000 +0100
  3. +++ linux-4.4.302/kernel/futex.c 2023-02-19 14:03:07.727035123 +0100
  4. @@ -1701,16 +1701,8 @@
  5. int oldval, ret;
  6. if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) {
  7. - if (oparg < 0 || oparg > 31) {
  8. - char comm[sizeof(current->comm)];
  9. - /*
  10. - * kill this print and return -EINVAL when userspace
  11. - * is sane again
  12. - */
  13. - pr_info_ratelimited("futex_wake_op: %s tries to shift op by %d; fix this program\n",
  14. - get_task_comm(comm, current), oparg);
  15. - oparg &= 31;
  16. - }
  17. + if (oparg < 0 || oparg > 31)
  18. + return -EINVAL;
  19. oparg = 1 << oparg;
  20. }