diff options
| author | Ming Lei <tom.leiming@gmail.com> | 2026-10-11 01:35:48 -0500 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-10-15 18:25:35 -0600 |
| commit | 84824afdb5a4dc127fbd7036142d7611c5e53651 (patch) | |
| tree | 3cef8aa853cb0de339ea9efb15d7ab8a432f48b4 /rust/kernel/alloc/kvec/errors.rs | |
| parent | f06ca594eafcdf58a399a0f92480631192e06032 (diff) | |
ublk: reset the FETCH round under ub->mutex
The release work resets the FETCH round without ub->mutex, while
START_DEV checks it under ub->mutex:
START_DEV (ub->mutex) release work
all queues ready? yes
ublksrv_tgid matches? yes
ublk_reset_ch_dev():
io->cmd = NULL, nr_queue_ready = 0
go live: a request then reaches ublk_queue_cmd() with a NULL io->cmd
Do the reset under ub->mutex. Then START_DEV sees the round either ready
or reset. The work already takes ub->mutex when there is a disk, after
it has aborted the requests; nothing holding ub->mutex waits for it.
Fixes: 728cbac5fe21 ("ublk: move device reset into ublk_ch_release()")
Cc: stable@vger.kernel.org
Tested-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Link: https://patch.msgid.link/20261011063555.1142277-6-tom.leiming@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
