All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction.
@ 2021-12-02 16:26 Mark Mielke
  2021-12-02 16:47 ` Fwd: " Mark Mielke
  2021-12-06 14:21 ` Stefan Hajnoczi
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Mielke @ 2021-12-02 16:26 UTC (permalink / raw)
  To: qemu-devel

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>
---
 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;
         }
-- 
2.33.1


-- 
Mark Mielke <mark.mielke@gmail.com>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Fwd: [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction.
  2021-12-02 16:26 [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction Mark Mielke
@ 2021-12-02 16:47 ` Mark Mielke
  2021-12-09 13:47   ` Ani Sinha
  2021-12-06 14:21 ` Stefan Hajnoczi
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Mielke @ 2021-12-02 16:47 UTC (permalink / raw)
  To: qemu-stable, Stefan Hajnoczi, Kevin Wolf, Hanna Reitz,
	qemu-block, qemu-devel
  Cc: Greg Kurz

Sorry... I missed copy maintainers and qemu-stable. This should be
considered a regression.

---------- Forwarded message ---------
From: Mark Mielke <mark.mielke@gmail.com>
Date: Thu, Dec 2, 2021 at 11:26 AM
Subject: [PATCH] virtio-blk: Fix clean up of host notifiers for single
MR transaction.
To: <qemu-devel@nongnu.org>


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>
---
 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;
         }
--
2.33.1

-- 
Mark Mielke <mark.mielke@gmail.com>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction.
  2021-12-02 16:26 [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction Mark Mielke
  2021-12-02 16:47 ` Fwd: " Mark Mielke
@ 2021-12-06 14:21 ` Stefan Hajnoczi
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2021-12-06 14:21 UTC (permalink / raw)
  To: Mark Mielke; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

On Thu, Dec 02, 2021 at 11:26:51AM -0500, Mark Mielke wrote:
> 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>
> ---
>  hw/block/dataplane/virtio-blk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block tree:
https://gitlab.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction.
  2021-12-02 16:47 ` Fwd: " Mark Mielke
@ 2021-12-09 13:47   ` Ani Sinha
  0 siblings, 0 replies; 4+ messages in thread
From: Ani Sinha @ 2021-12-09 13:47 UTC (permalink / raw)
  To: mark.mielke
  Cc: Kevin Wolf, qemu-block, qemu-stable, qemu-devel, Hanna Reitz,
	Stefan Hajnoczi, Greg Kurz

On Thu, Dec 2, 2021 at 10:34 PM Mark Mielke <mark.mielke@gmail.com> wrote:
>
> Sorry... I missed copy maintainers and qemu-stable. This should be
> considered a regression.
>
> ---------- Forwarded message ---------
> From: Mark Mielke <mark.mielke@gmail.com>
> Date: Thu, Dec 2, 2021 at 11:26 AM
> Subject: [PATCH] virtio-blk: Fix clean up of host notifiers for single
> MR transaction.
> To: <qemu-devel@nongnu.org>
>
>
> 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>

Reviewed-by: Ani Sinha <ani@anisinha.ca>

> ---
>  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;
>          }
> --
> 2.33.1
>
> --
> Mark Mielke <mark.mielke@gmail.com>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-09 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02 16:26 [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction Mark Mielke
2021-12-02 16:47 ` Fwd: " Mark Mielke
2021-12-09 13:47   ` Ani Sinha
2021-12-06 14:21 ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.