[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qemu-xen staging-4.16] virtio-blk: Fix clean up of host notifiers for single MR transaction.



commit fec12fc8882b7326e820696ef81da3f1deeca11b
Author:     Mark Mielke <mark.mielke@xxxxxxxxx>
AuthorDate: Thu Dec 2 11:26:51 2021 -0500
Commit:     Michael Roth <michael.roth@xxxxxxx>
CommitDate: Tue Dec 14 15:10:56 2021 -0600

    virtio-blk: Fix clean up of host notifiers for single MR transaction.
    
    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@xxxxxxxxx>
    Message-id: 
CALm7yL08qarOu0dnQkTN+pa=BSRC92g31YpQQNDeAiT4yLZWQQ@xxxxxxxxxxxxxx
    Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
    (cherry picked from commit 5b807181c27a940a3a7ad1f221a2e76a132cbdc0)
    Signed-off-by: Michael Roth <michael.roth@xxxxxxx>
---
 hw/block/dataplane/virtio-blk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 252c3a7a23..ee5a5352dc 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -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;
         }
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#staging-4.16



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.