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)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Nov 2021 16:00:42 +0000 (09:00 -0700)
commite302f1046f4c209291b07ff7bc4d15ca26891f16
treefc871b3af2c22a0ae6cce0de9e2c685558442449
parent5562a8d71aa32ea27133d8b10406b3dcd57c01a5
io_uring: fix no lock protection for ctx->cq_extra

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>
fs/io_uring.c