summaryrefslogtreecommitdiff
path: root/include/linux/task_work.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-03-31 09:03:03 -0600
committerJens Axboe <axboe@kernel.dk>2021-04-11 19:30:17 -0600
commitb2e720ace221f9be75fefdba7d0ebab9d05fc561 (patch)
treef27cffd5bb490baa001e531972b408749a94f809 /include/linux/task_work.h
parent50e96989d736b8e5623059815247be01ca6713c1 (diff)
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: b69de288e913 ("io_uring: allow events and user_data update of running poll requests") Reported-by: Joakim Hassila <joj@mac.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/task_work.h')
0 files changed, 0 insertions, 0 deletions