Skip to content

Fix memory leak of some device state in migration

Jinhao Gao qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 5 repliesIn review
  2. v23 patches 2 repliesSuperseded
  3. v18 patches 7 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3spapr_pci: Fix memory leak of vmstate_spapr_pcihw/ppc/spapr_pci.c+11 -00 replies
2/3savevm: Fix memory leak of vmstate_configurationmigration/savevm.c+27 -40 replies
3/3vmstate: Fix memory leak in vmstate_handle_alloc()migration/vmstate.c+1 -04 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDavid GibsonMichael S. TsirkinDr. David Alan Gilbert
1/3A-b R-b
2/3R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/3] Fix memory leak of some device state in migration

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(-)
Signature · 1 line
2.23.0