Skip to content

fix SQPOLL and exit races

Pavel Begunkov io-uring 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4io_uring: io_rw_reissue lockdep annotationsfs/io_uring.c+2 -00 replies
2/4io_uring: inline io_uring_attempt_task_drop()fs/io_uring.c+11 -180 replies
3/4io_uring: add warn_once for io_uring_flush()fs/io_uring.c+10 -40 replies
4/4io_uring: stop SQPOLL submit on creator's deathfs/io_uring.c+53 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] fix SQPOLL and exit races

The series prevents submissions from SQPOLL thread when sqo_task is getting killed (or exec()ed). That should solve races introduced by a patch that allowed task_works during cancellation.

Jens, IIRC you said that io_rw_reissue() is called only during submission, right? 4/4 depends on that, so 1/4 should help to catch any misbehaviour. I reduced nr_requests but wasn't able to trigger io_resubmit_prep() for iopoll or not. What was the trick again?

4/4 is actually fairly simple, but safety measures and comments make it to bloat. The overhead is pretty negligible, and it allows to kill more, but that's for-next.

Pavel Begunkov (4):
io_uring: io_rw_reissue lockdep annotations
io_uring: inline io_uring_attempt_task_drop()
io_uring: add warn_once for io_uring_flush()
io_uring: stop SQPOLL submit on creator's death

 fs/io_uring.c | 97 +++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 71 insertions(+), 26 deletions(-)
Signature · 1 line
2.24.0