summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorHui Su <sh_def@163.com>2026-08-18 18:33:36 +0800
committerJens Axboe <axboe@kernel.dk>2026-08-25 11:51:38 -0600
commit14572de82e5022899e5856008bc9cac97004a88c (patch)
tree57e94133da53531a77dec8ac3921424ae7675d0c /scripts/const_structs.checkpatch
parentba77efee1b95b4ad7559b1cdbe7cd7fa36dca95b (diff)
downloadlinux-14572de82e5022899e5856008bc9cac97004a88c.tar.gz
linux-14572de82e5022899e5856008bc9cac97004a88c.zip
io_uring/waitid: honor task_work cancellation
io_waitid_cb() may run through the fallback task_work path when task_work_add() can no longer queue work to the originating task. The fallback runs from a kworker and io_uring marks such task work as canceled through tw.cancel. io_waitid_cb() currently ignores tw.cancel and calls __do_wait(). waitid is task-context dependent: __do_wait() performs child lookup relative to current, and the retry path also uses current->signal->wait_chldexit. If the callback runs from the fallback kworker, current is therefore not the task that submitted the request. Honor tw.cancel before entering __do_wait(). Complete the request with -ECANCELED and skip the siginfo copy, since canceled task work may run without the submitting task's userspace execution context. Keep the existing siginfo handling for normal waitid completion and explicit 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-2-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