Patch 1 is the fix from v1, rebased on top of Linus's commit
cea5f91daa3a ("wait-event: clean up the internal helper arguments").
Patch 2 makes __wait_event_interruptible_locked() take wq_flags like
___wait_event() now does, as Oleg suggested.
Reproducer: https://github.com/manitofigh/files/blob/main/linux-repros/evexcl.c
gpiolib-cdev and cros_ec_chardev use the same helpers and can be
polled too, so this fixes them as well.
---
Changes in v2:
- Rebased on Linus's master, on top of cea5f91daa3a.
- New patch 2: pass wq_flags instead of a 0/1 "exclusive" argument (Oleg).
- Link to v1: https://patch.msgid.link/20261111-b4-sched-wait-intr-head-v1-1-17cf2af5b964@columbia.edu
- Discussion: https://lore.kernel.org/all/awMhxEuMHULvk8SA@redhat.com/
---
Mani Tofigh (2):
sched/wait: Queue non-exclusive waiters at the head in do_wait_intr*()
sched/wait: Pass wq_flags to __wait_event_interruptible_locked()
include/linux/wait.h | 11 ++++++-----
kernel/sched/wait.c | 16 ++++++++++++----
2 files changed, 18 insertions(+), 9 deletions(-)
---
base-commit: 6e4122f0242a3262512ee3e6f2e7e6de0bd5792b
change-id: 20261111-b4-sched-wait-intr-head-c5e8f0b541f4
Best regards,
--
Mani Tofigh <mt4022@columbia.edu>