aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.c
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <hawk@comx.dk>2009-09-23 15:57:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 07:21:05 -0700
commit458e5ff13e1bed050990d97e9aa55bcdafc951a7 (patch)
tree521d837beabe5265f070351a8ea42d48408ec5d7 /drivers/edac/edac_mc.c
parentdd8ef1db87a486577b3a76e6ad45df52e12d0145 (diff)
downloadkernel_samsung_smdk4412-458e5ff13e1bed050990d97e9aa55bcdafc951a7.zip
kernel_samsung_smdk4412-458e5ff13e1bed050990d97e9aa55bcdafc951a7.tar.gz
kernel_samsung_smdk4412-458e5ff13e1bed050990d97e9aa55bcdafc951a7.tar.bz2
edac: core: remove completion-wait for complete with rcu_barrier
Module edac_core.ko uses call_rcu() callbacks in edac_device.c, edac_mc.c and edac_pci.c. They all use a wait_for_completion() scheme, but this scheme it not 100% safe on multiple CPUs. See the _rcu_barrier() implementation which explains why extra precausion is needed. The patch adds a comment about rcu_barrier() and as a precausion calls rcu_barrier(). A maintainer needs to look at removing the wait_for_completion code. [dougthompson@xmission.com: remove the wait_for_completion code] Signed-off-by Jesper Dangaard Brouer <hawk@comx.dk> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r--drivers/edac/edac_mc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 335b7eb..b629c41 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -418,16 +418,14 @@ static void complete_mc_list_del(struct rcu_head *head)
mci = container_of(head, struct mem_ctl_info, rcu);
INIT_LIST_HEAD(&mci->link);
- complete(&mci->complete);
}
static void del_mc_from_global_list(struct mem_ctl_info *mci)
{
atomic_dec(&edac_handlers);
list_del_rcu(&mci->link);
- init_completion(&mci->complete);
call_rcu(&mci->rcu, complete_mc_list_del);
- wait_for_completion(&mci->complete);
+ rcu_barrier();
}
/**