You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] EDAC: protect memory controller list
- Fix code so we always hold mem_ctls_mutex while we are stepping through the list of mem_ctl_info structures. Otherwise bad things may happen if one task is stepping through the list while another task is modifying it. We may eventually want to use reference counting to manage the mem_ctl_info structures. In the meantime we may as well fix this bug. - Don't disable interrupts while we are walking the list of mem_ctl_info structures in check_mc_devices(). This is unnecessary. Signed-off-by: David S. Peterson <dsp@llnl.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
472678ebd3
commit
18dbc337af
@@ -237,9 +237,10 @@ static void __devexit i82860_remove_one(struct pci_dev *pdev)
|
||||
|
||||
debugf0("%s()\n", __func__);
|
||||
|
||||
mci = edac_mc_find_mci_by_pdev(pdev);
|
||||
if ((mci != NULL) && (edac_mc_del_mc(mci) == 0))
|
||||
edac_mc_free(mci);
|
||||
if ((mci = edac_mc_del_mc(pdev)) == NULL)
|
||||
return;
|
||||
|
||||
edac_mc_free(mci);
|
||||
}
|
||||
|
||||
static const struct pci_device_id i82860_pci_tbl[] __devinitdata = {
|
||||
|
||||
Reference in New Issue
Block a user