Skip to content

Plug some memory leaks on unrealize

[email protected] qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest4 patches 4 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ipmi_bmc_sim: Remove an unnecessary mutexhw/ipmi/ipmi_bmc_sim.c+0 -60 replies
2/4wdt_i6300esb: Free timerhw/watchdog/wdt_i6300esb.c+10 -00 replies
3/4wdt_ib700: Free timerhw/watchdog/wdt_ib700.c+12 -00 replies
4/4ipmi_bmc_sim: Add a proper unrealize functionhw/ipmi/ipmi_bmc_sim.c+16 -00 replies

Reviews trailers per patch

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

PatchMarc-André LureauRichard W.M. Jones
1/4R-b
2/4R-b R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/4] Plug some memory leaks on unrealize

Changes from v2:

Set the timers to NULL when unrealizing them, as the data structure is still intact.

Split out the removal of the mutex from ipmi_bmc_sim to its own patch.

I did figure out a way to test these. You can set the realize bool in the qapi for the device to cause it to be realized/unrealized.

This has kind of opened a can of worms for me, though. Looking at a lot of the devices, there is no unrealize function and that can leave a lot of things hanging. And for ISA bus devices, there is no way to unregister ports.

I have a separate patch to make the BMCs not hot-pluggable and fix up a few other small things I saw as a result of understanding this better. But those probably don't belong here.

Thanks,

-corey