diff options
author | 2025-07-01 15:23:25 +0800 | |
---|---|---|
committer | 2025-07-01 07:54:35 -0600 | |
commit | 01ed88aea527e19def9070349399684522c66c72 (patch) | |
tree | fa5b34fef0cb88e6227732fd173efdde3b8c7798 /rust/pin-init/internal/src | |
parent | block: fix false warning in bdev_count_inflight_rw() (diff) | |
download | wireguard-linux-01ed88aea527e19def9070349399684522c66c72.tar.xz wireguard-linux-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 <czhong@redhat.com>
Fixes: 524346e9d79f ("ublk: build batch from IOs in same io_ring_ctx and io task")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250701072325.1458109-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/pin-init/internal/src')
0 files changed, 0 insertions, 0 deletions