From 18dbc337af5d6efd30cb9291e74722c8ad134fd3 Mon Sep 17 00:00:00 2001 From: Dave Peterson Date: Sun, 26 Mar 2006 01:38:50 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/edac/edac_mc.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/edac/edac_mc.h') diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h index c9c1590db72..2cec157aaeb 100644 --- a/drivers/edac/edac_mc.h +++ b/drivers/edac/edac_mc.h @@ -410,14 +410,11 @@ void edac_mc_dump_csrow(struct csrow_info *csrow); #endif /* CONFIG_EDAC_DEBUG */ extern int edac_mc_add_mc(struct mem_ctl_info *mci); -extern int edac_mc_del_mc(struct mem_ctl_info *mci); +extern struct mem_ctl_info * edac_mc_del_mc(struct pci_dev *pdev); extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, unsigned long page); -extern struct mem_ctl_info *edac_mc_find_mci_by_pdev(struct pci_dev - *pdev); - extern void edac_mc_scrub_block(unsigned long page, unsigned long offset, u32 size); -- cgit v1.2.3