Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit b2e720ac authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: fix race around poll update and poll triggering

Joakim reports that in some conditions he sees a multishot poll request
being canceled, and that it coincides with getting -EALREADY on
modification. As part of the poll update procedure, there's a small window
where the request is marked as canceled, and if this coincides with the
event actually triggering, then we can get a spurious -ECANCELED and
termination of the multishot request.

Don't mark the poll request as being canceled for update. We also don't
care if we race on removal unless it's a one-shot request, we can safely
updated for either case.

Fixes: b69de288

 ("io_uring: allow events and user_data update of running poll requests")
Reported-by: default avatarJoakim Hassila <joj@mac.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 50e96989
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment