diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-11 00:58:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-24 11:20:37 -0200 |
commit | 41ba6c10586dfab632725cd532677ae5ae460e3e (patch) | |
tree | 4d30fa1d5f7818be4e434db1316d0ef94adc8434 /drivers/edac/i7core_edac.c | |
parent | 6ee7dd504490f3dc25cfe1c9be5b6e8895f89a92 (diff) | |
download | linux-stable-41ba6c10586dfab632725cd532677ae5ae460e3e.tar.gz linux-stable-41ba6c10586dfab632725cd532677ae5ae460e3e.tar.bz2 linux-stable-41ba6c10586dfab632725cd532677ae5ae460e3e.zip |
i7core_edac: MCE NMI handling should stop first
Otherwise, a NMI may happen causing a race condition and a panic.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r-- | drivers/edac/i7core_edac.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index d2b2ed8915fd..e5aa06e6389e 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -2070,6 +2070,10 @@ static void __devexit i7core_remove(struct pci_dev *pdev) debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", __func__, mci, &i7core_dev->pdev[0]->dev); + /* Disable MCE NMI handler */ + edac_mce_unregister(&pvt->edac_mce); + + /* Disable EDAC polling */ if (likely(pvt->i7core_pci)) edac_pci_release_generic_ctl(pvt->i7core_pci); else @@ -2078,11 +2082,14 @@ static void __devexit i7core_remove(struct pci_dev *pdev) i7core_dev->socket); pvt->i7core_pci = NULL; + /* Remove MC sysfs nodes */ edac_mc_del_mc(&i7core_dev->pdev[0]->dev); - edac_mce_unregister(&pvt->edac_mce); + /* Free data */ kfree(mci->ctl_name); edac_mc_free(mci); + + /* Release PCI resources */ i7core_put_devices(i7core_dev); } } |