]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
virtio-blk: Fix clean up of host notifiers for single MR transaction.
authorMark Mielke <mark.mielke@gmail.com>
Thu, 2 Dec 2021 16:26:51 +0000 (11:26 -0500)
committerMichael Roth <michael.roth@amd.com>
Tue, 14 Dec 2021 21:10:56 +0000 (15:10 -0600)
The code that introduced "virtio-blk: Configure all host notifiers in
a single MR transaction" introduced a second loop variable to perform
cleanup in second loop, but mistakenly still refers to the first
loop variable within the second loop body.

Fixes: d0267da61489 ("virtio-blk: Configure all host notifiers in a single MR transaction")
Signed-off-by: Mark Mielke <mark.mielke@gmail.com>
Message-id: CALm7yL08qarOu0dnQkTN+pa=BSRC92g31YpQQNDeAiT4yLZWQQ@mail.gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 5b807181c27a940a3a7ad1f221a2e76a132cbdc0)
Signed-off-by: Michael Roth <michael.roth@amd.com>
hw/block/dataplane/virtio-blk.c

index 252c3a7a230ca8d66ee8ba6eabd7d749c23716e2..ee5a5352dc8a76b5f1525914d6a0b0b7182121ac 100644 (file)
@@ -222,7 +222,7 @@ int virtio_blk_data_plane_start(VirtIODevice *vdev)
             memory_region_transaction_commit();
 
             while (j--) {
-                virtio_bus_cleanup_host_notifier(VIRTIO_BUS(qbus), i);
+                virtio_bus_cleanup_host_notifier(VIRTIO_BUS(qbus), j);
             }
             goto fail_host_notifiers;
         }