[PATCH v2 0/3] mm: Fix memory block leaks and locking

From: Muchun Song

Date: Tue Apr 28 2026 - 05:32:18 EST


This series fixes two memory block device reference leaks and one
locking issue around the per-memory_block hwpoison counter.

Changes in v2:
- Add Acked-by from Oscar Salvador to patch 1.
- Keep the series as pure bug fixes; defer
memory_block_get_by_id()/memory_block_put cleanup to a separate
series.
- Add Reviewed-by from Miaohe Lin to patch 2.
- Add device_hotplug_lock handling in patch 3.

Muchun Song (3):
mm/memory_hotplug: fix memory block reference leak on remove
drivers/base/memory: fix memory block reference leak in poison
accounting
drivers/base/memory: fix locking for poison accounting lookup

drivers/base/memory.c | 18 ++++++++++++++----
mm/memory_hotplug.c | 2 ++
2 files changed, 16 insertions(+), 4 deletions(-)


base-commit: 7080e32d3f09d8688c4a87d81bdcc71f7f606b16
--
2.20.1