X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fedac%2Fedac_device.c;h=c3f67437afb666f489cf926d573501fb79c344a4;hb=82b982c9a697e7be0745523a53334fe38a4582c8;hp=a7408cf86f37f5ece603052bd8956cae30269777;hpb=751516f0a9bad32544f40f471037c0e45fb639c9;p=karo-tx-linux.git diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index a7408cf86f37..c3f67437afb6 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c @@ -345,31 +345,19 @@ fail1: return 1; } -/* - * complete_edac_device_list_del - * - * callback function when reference count is zero - */ -static void complete_edac_device_list_del(struct rcu_head *head) -{ - struct edac_device_ctl_info *edac_dev; - - edac_dev = container_of(head, struct edac_device_ctl_info, rcu); - INIT_LIST_HEAD(&edac_dev->link); -} - /* * del_edac_device_from_global_list - * - * remove the RCU, setup for a callback call, - * then wait for the callback to occur */ static void del_edac_device_from_global_list(struct edac_device_ctl_info *edac_device) { list_del_rcu(&edac_device->link); - call_rcu(&edac_device->rcu, complete_edac_device_list_del); - rcu_barrier(); + + /* these are for safe removal of devices from global list while + * NMI handlers may be traversing list + */ + synchronize_rcu(); + INIT_LIST_HEAD(&edac_device->link); } /*