diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-08-31 14:13:11 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-31 11:45:31 -0600 |
commit | b8ce1b9d25ccf81e1bbabd45b963ed98b2222df8 (patch) | |
tree | acb5d0620d7551f7d30c80d20d826c63f0d27ec8 /fs/io-wq.c | |
parent | c6d3d9cbd659de8f2176b4e4721149c88ac096d4 (diff) | |
download | linux-b8ce1b9d25ccf81e1bbabd45b963ed98b2222df8.tar.bz2 |
io_uring: don't submit half-prepared drain request
[ 3784.910888] BUG: kernel NULL pointer dereference, address: 0000000000000020
[ 3784.910904] RIP: 0010:__io_file_supports_nowait+0x5/0xc0
[ 3784.910926] Call Trace:
[ 3784.910928] ? io_read+0x17c/0x480
[ 3784.910945] io_issue_sqe+0xcb/0x1840
[ 3784.910953] __io_queue_sqe+0x44/0x300
[ 3784.910959] io_req_task_submit+0x27/0x70
[ 3784.910962] tctx_task_work+0xeb/0x1d0
[ 3784.910966] task_work_run+0x61/0xa0
[ 3784.910968] io_run_task_work_sig+0x53/0xa0
[ 3784.910975] __x64_sys_io_uring_enter+0x22/0x30
[ 3784.910977] do_syscall_64+0x3d/0x90
[ 3784.910981] entry_SYSCALL_64_after_hwframe+0x44/0xae
io_drain_req() goes before checks for REQ_F_FAIL, which protect us from
submitting under-prepared request (e.g. failed in io_init_req(). Fail
such drained requests as well.
Fixes: a8295b982c46d ("io_uring: fix failed linkchain code logic")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e411eb9924d47a131b1e200b26b675df0c2b7627.1630415423.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.c')
0 files changed, 0 insertions, 0 deletions