aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index ba6996943e28..d4437345706f 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1484,11 +1484,13 @@ void synchronize_sched(void)
1484 if (rcu_blocking_is_gp()) 1484 if (rcu_blocking_is_gp())
1485 return; 1485 return;
1486 1486
1487 init_rcu_head_on_stack(&rcu.head);
1487 init_completion(&rcu.completion); 1488 init_completion(&rcu.completion);
1488 /* Will wake me after RCU finished. */ 1489 /* Will wake me after RCU finished. */
1489 call_rcu_sched(&rcu.head, wakeme_after_rcu); 1490 call_rcu_sched(&rcu.head, wakeme_after_rcu);
1490 /* Wait for it. */ 1491 /* Wait for it. */
1491 wait_for_completion(&rcu.completion); 1492 wait_for_completion(&rcu.completion);
1493 destroy_rcu_head_on_stack(&rcu.head);
1492} 1494}
1493EXPORT_SYMBOL_GPL(synchronize_sched); 1495EXPORT_SYMBOL_GPL(synchronize_sched);
1494 1496
@@ -1508,11 +1510,13 @@ void synchronize_rcu_bh(void)
1508 if (rcu_blocking_is_gp()) 1510 if (rcu_blocking_is_gp())
1509 return; 1511 return;
1510 1512
1513 init_rcu_head_on_stack(&rcu.head);
1511 init_completion(&rcu.completion); 1514 init_completion(&rcu.completion);
1512 /* Will wake me after RCU finished. */ 1515 /* Will wake me after RCU finished. */
1513 call_rcu_bh(&rcu.head, wakeme_after_rcu); 1516 call_rcu_bh(&rcu.head, wakeme_after_rcu);
1514 /* Wait for it. */ 1517 /* Wait for it. */
1515 wait_for_completion(&rcu.completion); 1518 wait_for_completion(&rcu.completion);
1519 destroy_rcu_head_on_stack(&rcu.head);
1516} 1520}
1517EXPORT_SYMBOL_GPL(synchronize_rcu_bh); 1521EXPORT_SYMBOL_GPL(synchronize_rcu_bh);
1518 1522