diff options
| author | Juanlu Herrero <juanlu@fastmail.com> | 2026-10-13 15:37:20 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-10-15 14:17:58 -0600 |
| commit | 937d38dcacd675dc0572d6c9b6743960df3128ed (patch) | |
| tree | cd19a51289b75597e66411502dfcd08f861d3978 /kernel/livepatch | |
| parent | 98bc044d5a5374f8d3605fe55a8e2df6d6fc3f82 (diff) | |
io_uring/poll: avoid retry wakeup loss when dropping ownership
If a wakeup sets IO_POLL_RETRY_FLAG between the owning task consuming
the existing instance of IO_POLL_RETRY_FLAG and the loop check
of io_poll_check_events(), then we stall on processing the request
until an unrelated wakeup comes along.
Using atomic_cmpxchg instead of atomic_sub_return to guarantee both the
count v and poll_refs are 0 and no wake-ups are missed.
Cc: stable@vger.kernel.org
Fixes: a26a35e9019f ("io_uring: make poll refs more robust")
Signed-off-by: Juanlu Herrero <juanlu@fastmail.com>
Assisted-by: LLM
Suggested-by: Anand Natarajan <anand@meta.com>
Link: https://patch.msgid.link/20261013-pu-cmpxchg-v1-1-4ddc10fd8a03@fastmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/livepatch')
0 files changed, 0 insertions, 0 deletions
