All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: ibmphp: Free the EBDA controller table descriptor
@ 2026-12-02  2:45 Haoxiang Li
  2026-12-02  2:48 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Haoxiang Li @ 2026-12-02  2:45 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, Haoxiang Li

ibmphp_access_ebda() allocates a controller table descriptor that
is retained for the controller count during driver operation.
However, neither the initialization failure path nor the module
exit path frees the descriptor.

Free the descriptor in ibmphp_free_ebda_hpc_queue(), which is
called on both initialization failure and module exit.

Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
---
 drivers/pci/hotplug/ibmphp_ebda.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index c1939b88e75b..2d728f58c05c 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -1053,6 +1053,9 @@ void ibmphp_free_ebda_hpc_queue(void)
 		}
 		free_ebda_hpc(controller);
 	}
+
+	kfree(hpc_list_ptr);
+	hpc_list_ptr = NULL;
 }
 
 void ibmphp_free_ebda_pci_rsrc_queue(void)
-- 
2.25.1


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

end of thread, other threads:[~2026-12-02  2:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02  2:45 [PATCH] PCI: ibmphp: Free the EBDA controller table descriptor Haoxiang Li
2026-12-02  2:48 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.