From bbc560ae677c0f4d7ff8404a21409c99f35b297b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 16 Aug 2010 18:22:43 -0300 Subject: [PATCH] edac_core: Print debug messages at release calls This is important to track a nasty bug at the free logic. Signed-off-by: Mauro Carvalho Chehab --- drivers/edac/edac_mc.c | 2 ++ drivers/edac/edac_mc_sysfs.c | 2 ++ drivers/edac/i7core_edac.c | 1 + 3 files changed, 5 insertions(+) diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index b10b45cc7870..889ce7566b56 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c @@ -235,6 +235,8 @@ EXPORT_SYMBOL_GPL(edac_mc_alloc); */ void edac_mc_free(struct mem_ctl_info *mci) { + debugf1("%s()\n", __func__); + edac_mc_unregister_sysfs_main_kobj(mci); } EXPORT_SYMBOL_GPL(edac_mc_free); diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 7024b873a3b9..ddd765253630 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -712,6 +712,8 @@ fail_out: */ void edac_mc_unregister_sysfs_main_kobj(struct mem_ctl_info *mci) { + debugf1("%s()\n", __func__); + /* delete the kobj from the mc_kset */ kobject_put(&mci->edac_mci_kobj); } diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 11c61b4d8149..b0559973c66f 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -2086,6 +2086,7 @@ static void __devexit i7core_remove(struct pci_dev *pdev) edac_mc_del_mc(&i7core_dev->pdev[0]->dev); /* Free data */ + debugf1("%s: free structs\n"); kfree(mci->ctl_name); edac_mc_free(mci); -- 2.39.5