qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Move net backend cleanup to NIC cleanup
@ 2024-01-29 13:24 Eugenio Pérez
  2024-01-29 13:24 ` [PATCH 1/2] net: parameterize the removing client from nc list Eugenio Pérez
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Eugenio Pérez @ 2024-01-29 13:24 UTC (permalink / raw)
  To: qemu-devel, mst
  Cc: si-wei.liu, leiyang, yajunw, Ani Sinha, Jason Wang, dtatulea,
	mcoqueli

Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net
structures if peer nic is present") effectively delayed the backend
cleanup, allowing the frontend or the guest to access it resources as
long as the frontend NIC is still visible to the guest.

However it does not clean up the resources until the qemu process is
over.  This causes an effective leak if the device is deleted with
device_del, as there is no way to close the vdpa device.  This makes
impossible to re-add that device to this or other QEMU instances until
the first instance of QEMU is finished.

Move the cleanup from qemu_cleanup to the NIC deletion.

Fixes: a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present")
Acked-by: Jason Wang <jasowang@redhat.com>
Reported-by: Lei Yang <leiyang@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>

Eugenio Pérez (2):
  net: parameterize the removing client from nc list
  net: move backend cleanup to NIC cleanup

 net/net.c        | 30 ++++++++++++++++++++----------
 net/vhost-vdpa.c |  8 --------
 2 files changed, 20 insertions(+), 18 deletions(-)

-- 
2.39.3




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

end of thread, other threads:[~2024-09-11 17:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 13:24 [PATCH 0/2] Move net backend cleanup to NIC cleanup Eugenio Pérez
2024-01-29 13:24 ` [PATCH 1/2] net: parameterize the removing client from nc list Eugenio Pérez
2024-01-29 13:24 ` [PATCH 2/2] net: move backend cleanup to NIC cleanup Eugenio Pérez
2024-02-01  5:43 ` [PATCH 0/2] Move net " Jason Wang
2024-09-10  3:40   ` Si-Wei Liu
2024-09-10  3:46     ` Jason Wang
2024-09-11  9:04       ` Eugenio Perez Martin
2024-09-11 17:48         ` Eugenio Perez Martin

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).