Skip to content
Commit f15e6426 authored by Jens Axboe's avatar Jens Axboe Committed by Sasha Levin
Browse files

io_uring: only assign io_uring_enter() SQPOLL error in actual error case



[ upstream commit 21f96522 ]

If an SQPOLL based ring is newly created and an application issues an
io_uring_enter(2) system call on it, then we can return a spurious
-EOWNERDEAD error. This happens because there's nothing to submit, and
if the caller doesn't specify any other action, the initial error
assignment of -EOWNERDEAD never gets overwritten. This causes us to
return it directly, even if it isn't valid.

Move the error assignment into the actual failure case instead.

Cc: stable@vger.kernel.org
Fixes: d9d05217 ("io_uring: stop SQPOLL submit on creator's death")
Reported-by: default avatarSherlock Holo <sherlockya@gmail.com>
Link: https://github.com/axboe/liburing/issues/413


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 695ab28a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment