]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/io_uring.c
io_uring: fix no lock protection for ctx->cq_extra
authorHao Xu <haoxu@linux.alibaba.com>
Thu, 25 Nov 2021 09:21:02 +0000 (17:21 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Wed, 9 Mar 2022 14:17:45 +0000 (15:17 +0100)
commit9632410b42f050a4495d11a5e08dd1ca4f2211cb
treeee76fc788fd0c6df1bae4a93266d7240c74c24e4
parent0a65446a1973c06d6e99a7ed581e763ab4cbe5f4
io_uring: fix no lock protection for ctx->cq_extra

BugLink: https://bugs.launchpad.net/bugs/1964361
[ Upstream commit e302f1046f4c209291b07ff7bc4d15ca26891f16 ]

ctx->cq_extra should be protected by completion lock so that the
req_need_defer() does the right check.

Cc: stable@vger.kernel.org
Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
Link: https://lore.kernel.org/r/20211125092103.224502-2-haoxu@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/io_uring.c