summaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-07-01 13:26:05 +0100
committerJens Axboe <axboe@kernel.dk>2021-07-01 13:40:32 -0600
commite09ee510600b941c62e94f6b59878cf53ba0e447 (patch)
treee0ec580f8a7b915b9368913228f2a39c43b116f7 /arch/xtensa
parent5b0a6acc73fcac5f7d17badd09275bf7b9b46603 (diff)
downloadlinux-e09ee510600b941c62e94f6b59878cf53ba0e447.tar.gz
linux-e09ee510600b941c62e94f6b59878cf53ba0e447.tar.bz2
linux-e09ee510600b941c62e94f6b59878cf53ba0e447.zip
io_uring: fix exiting io_req_task_work_add leaks
If one entered io_req_task_work_add() not seeing PF_EXITING, it will set a ->task_state bit and try task_work_add(), which may fail by that moment. If that happens the function would try to cancel the request. However, in a meanwhile there might come other io_req_task_work_add() callers, which will see the bit set and leave their requests in the list, which will never be executed. Don't propagate an error, but clear the bit first and then fallback all requests that we can splice from the list. The callback functions have to be able to deal with PF_EXITING, so poll and apoll was modified via changing io_poll_rewait(). Fixes: 7cbf1722d5fc ("io_uring: provide FIFO ordering for task_work") Reported-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/060002f19f1fdbd130ba24aef818ea4d3080819b.1625142209.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'arch/xtensa')
0 files changed, 0 insertions, 0 deletions