summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorHui Su <sh_def@163.com>2026-08-18 18:33:37 +0800
committerJens Axboe <axboe@kernel.dk>2026-08-25 11:51:38 -0600
commit2cf20c4e0f72d523b8673053e7120d092ff1f074 (patch)
tree40ec728c1957cd63dc128b54133d8c2cb045add6 /scripts/const_structs.checkpatch
parent14572de82e5022899e5856008bc9cac97004a88c (diff)
downloadlinux-2cf20c4e0f72d523b8673053e7120d092ff1f074.tar.gz
linux-2cf20c4e0f72d523b8673053e7120d092ff1f074.zip
io_uring/waitid: avoid siginfo copy during ring teardown
During ring teardown, io_ring_exit_work() cancels outstanding requests from a kworker with a NULL tctx. The waitid cancellation path eventually reaches io_waitid_finish(), which copies the stored siginfo to the userspace pointer supplied with the request. Ring-wide teardown does not run in the task context that submitted the request, so it must not access that task's userspace pointer. Depending on the address and mm state, the copy may fail with -EFAULT, but the uaccess itself is inappropriate from the teardown kworker. Use a no-copy cancellation callback when io_waitid_remove_all() is called without an owning task context. Complete the request with -ECANCELED while releasing the waitid state without touching siginfo. Keep the existing siginfo handling for explicit async cancellation and task-scoped cancellation. Fixes: f31ecf671ddc ("io_uring: add IORING_OP_WAITID support") Cc: stable@vger.kernel.org Signed-off-by: Hui Su <sh_def@163.com> Link: https://patch.msgid.link/20260818103336.1922818-3-sh_def@163.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions