Commit f0d47ca5 authored by Jens Axboe's avatar Jens Axboe Committed by Zheng Zengkai
Browse files

io_uring: kill goto error handling in io_sqpoll_wait_sq()

stable inclusion
from stable-v5.10.155
commit 0f544353fec8e717d37724d95b92538e1de79e86
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I69NMA
CVE: CVE-2022-47946

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f544353fec8e717d37724d95b92538e1de79e86



--------------------------------

Hunk extracted from commit 70aacfe6
upstream.

If the sqpoll thread has died, the out condition doesn't remove the
waiting task from the waitqueue. The goto and check are not needed, just
make it a break condition after setting the error value. That ensures
that we always remove ourselves from sqo_sq_wait waitqueue.

Reported-by: default avatarXingyuan Mo <hdthky0@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent 44942478
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment