Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 87ed28db authored by Jens Axboe's avatar Jens Axboe Committed by Treehugger Robot
Browse files

UPSTREAM: io_uring: don't drop completion lock before timer is fully initialized



No upstream commit exists for this patch.

If we drop the lock right after adding it to the timeout list, then
someone attempting to kill timeouts will find it in an indeterminate
state. That means that cancelation could attempt to cancel and remove
a timeout, and then io_timeout() proceeds to init and add the timer
afterwards.

Ensure the timeout request is fully setup before we drop the
completion lock, which guards cancelation as well.

Bug: 278721720
Reported-and-tested-by: default avatarLee Jones <lee@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6de3014d)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I6247b62e07825a0f06c7997d767dfc26fc4126e3
parent ce6a504d
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