qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jinhao Gao <gaojinhao@huawei.com>
To: <qemu-ppc@nongnu.org>, <qemu-devel@nongnu.org>
Cc: "Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Greg Kurz" <groug@kaod.org>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	wanghaibin.wang@huawei.com,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	zhukeqian1@huawei.com,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: [PATCH v3 0/3] Fix memory leak of some device state in migration
Date: Thu, 31 Dec 2020 14:10:17 +0800	[thread overview]
Message-ID: <20201231061020.828-1-gaojinhao@huawei.com> (raw)

For some device state having some fields of VMS_ALLOC flag, they
don't free memory allocated for the fields in vmstate_save_state
and vmstate_load_state. We add funcs or sentences of free memory
before and after VM saves or loads device state to avoid memory leak.

v2
 - Drop patch1-3,6-8 of v1
 - Address Michael's comment (free memory before load vmsd centrally)
 - Add David's Acked-by and Michael's Signed-off-by

v3
 - Add Euler's Reported-by and Michael's Reviewed-by

Jinhao Gao (3):
  spapr_pci: Fix memory leak of vmstate_spapr_pci
  savevm: Fix memory leak of vmstate_configuration
  vmstate: Fix memory leak in vmstate_handle_alloc()

 hw/ppc/spapr_pci.c  | 11 +++++++++++
 migration/savevm.c  | 31 +++++++++++++++++++++++++++----
 migration/vmstate.c |  1 +
 3 files changed, 39 insertions(+), 4 deletions(-)

-- 
2.23.0



             reply	other threads:[~2020-12-31  6:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31  6:10 Jinhao Gao [this message]
2020-12-31  6:10 ` [PATCH v3 1/3] spapr_pci: Fix memory leak of vmstate_spapr_pci Jinhao Gao
2020-12-31  6:10 ` [PATCH v3 2/3] savevm: Fix memory leak of vmstate_configuration Jinhao Gao
2020-12-31  6:10 ` [PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc() Jinhao Gao
2021-01-05 11:18   ` Dr. David Alan Gilbert
2021-01-06  5:46     ` gaojinhao
2021-02-08 10:52     ` Dr. David Alan Gilbert
2021-02-08 11:46       ` gaojinhao
2021-02-04 14:26 ` [PATCH v3 0/3] Fix memory leak of some device state in migration Dr. David Alan Gilbert

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=20201231061020.828-1-gaojinhao@huawei.com \
    --to=gaojinhao@huawei.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=groug@kaod.org \
    --cc=jasowang@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=wanghaibin.wang@huawei.com \
    --cc=zhukeqian1@huawei.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).