aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi/mpicoder.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2025-07-01 07:23:25 +0000
committerJens Axboe <[email protected]>2025-07-01 13:54:35 +0000
commit01ed88aea527e19def9070349399684522c66c72 (patch)
treefa5b34fef0cb88e6227732fd173efdde3b8c7798 /lib/crypto/mpi/mpicoder.c
parentblock: fix false warning in bdev_count_inflight_rw() (diff)
downloadkernel-01ed88aea527e19def9070349399684522c66c72.tar.gz
kernel-01ed88aea527e19def9070349399684522c66c72.zip
ublk: don't queue request if the associated uring_cmd is canceled
Commit 524346e9d79f ("ublk: build batch from IOs in same io_ring_ctx and io task") need to dereference `io->cmd` for checking if the IO can be added to current batch, see ublk_belong_to_same_batch() and io_uring_cmd_ctx_handle(). However, `io->cmd` may become invalid after the uring_cmd is canceled. Fixes it by only allowing to queue this IO in case that ublk_prep_req() returns `BLK_STS_OK`, when 'io->cmd' is guaranteed to be valid. Reported-by: Changhui Zhong <[email protected]> Fixes: 524346e9d79f ("ublk: build batch from IOs in same io_ring_ctx and io task") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpicoder.c')
0 files changed, 0 insertions, 0 deletions