From: Jens Freimann <jfreimann@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-trivial@nongnu.org, Laurent Vivier <laurent@vivier.eu>,
qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [PATCH 2/2] virtio-net: add missing object_unref()
Date: Mon, 8 Feb 2021 09:45:14 +0100 [thread overview]
Message-ID: <20210208084514.GE4035@linux.fritz.box> (raw)
In-Reply-To: <20210206123955.2196514-3-lvivier@redhat.com>
On Sat, Feb 06, 2021 at 01:39:55PM +0100, Laurent Vivier wrote:
>failover_add_primary() calls qdev_device_add() and doesn't unref
>the device. Because of that, when the device is unplugged a reference
>is remaining and prevents the cleanup of the object.
>
>This prevents to be able to plugin back the failover primary device,
>with errors like:
>
> (qemu) device_add vfio-pci,host=0000:41:00.0,id=hostdev0,bus=root.3,failover_pair_id=net0
> (qemu) device_del hostdev0
>
>We can check with "info qtree" and "info pci" that the device has been removed, and then:
>
> (qemu) device_add vfio-pci,host=0000:41:00.0,id=hostdev1,bus=root.3,failover_pair_id=net0
> Error: vfio 0000:41:00.0: device is already attached
> (qemu) device_add vfio-pci,host=0000:41:00.0,id=hostdev0,bus=root.3,failover_pair_id=net0
> qemu-kvm: Duplicate ID 'hostdev0' for device
>
>Fixes: 21e8709b29cd ("failover: Remove primary_dev member")
>Cc: quintela@redhat.com
>Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>---
> hw/net/virtio-net.c | 2 ++
> 1 file changed, 2 insertions(+)
>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Thank you Laurent!
regards,
Jens
next prev parent reply other threads:[~2021-02-08 15:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 12:39 [PATCH 0/2] failover: trivial cleanup and fix Laurent Vivier
2021-02-06 12:39 ` [PATCH 1/2] pci: cleanup failover sanity check Laurent Vivier
2021-02-06 14:32 ` Laurent Vivier
2021-02-08 8:42 ` Jens Freimann
2021-02-09 16:49 ` Laurent Vivier
2021-02-06 12:39 ` [PATCH 2/2] virtio-net: add missing object_unref() Laurent Vivier
2021-02-08 8:45 ` Jens Freimann [this message]
2021-02-09 16:50 ` Laurent Vivier
2021-02-10 13:40 ` [PATCH 0/2] failover: trivial cleanup and fix Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210208084514.GE4035@linux.fritz.box \
--to=jfreimann@redhat.com \
--cc=laurent@vivier.eu \
--cc=lvivier@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).