> virtblk_probe() marks the device ready before revalidating zones and
> adding the disk, and either of those can fail. The out_cleanup_disk path
> they take goes on to delete the virtqueues, but nothing tells the device
> to stop first, so it is still live when the rings are freed.
>
> Reset the device at out_cleanup_disk, which is only reachable after
> virtio_device_ready(). virtblk_remove() and virtblk_freeze_priv() both
> reset before deleting the virtqueues for the same reason.
>
> Fixes: dbb301f91fc8 ("virtio_blk: add error handling support for add_disk()")
> Signed-off-by: Yuho Choi <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=1