diff options
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index e2c5910546f6..387dd4599344 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -793,11 +793,6 @@ sync_rcu_preempt_exp_init(struct rcu_state *rsp, struct rcu_node *rnp) | |||
793 | * In fact, if you are using synchronize_rcu_expedited() in a loop, | 793 | * In fact, if you are using synchronize_rcu_expedited() in a loop, |
794 | * please restructure your code to batch your updates, and then Use a | 794 | * please restructure your code to batch your updates, and then Use a |
795 | * single synchronize_rcu() instead. | 795 | * single synchronize_rcu() instead. |
796 | * | ||
797 | * Note that it is illegal to call this function while holding any lock | ||
798 | * that is acquired by a CPU-hotplug notifier. And yes, it is also illegal | ||
799 | * to call this function from a CPU-hotplug notifier. Failing to observe | ||
800 | * these restriction will result in deadlock. | ||
801 | */ | 796 | */ |
802 | void synchronize_rcu_expedited(void) | 797 | void synchronize_rcu_expedited(void) |
803 | { | 798 | { |
@@ -819,7 +814,11 @@ void synchronize_rcu_expedited(void) | |||
819 | * being boosted. This simplifies the process of moving tasks | 814 | * being boosted. This simplifies the process of moving tasks |
820 | * from leaf to root rcu_node structures. | 815 | * from leaf to root rcu_node structures. |
821 | */ | 816 | */ |
822 | get_online_cpus(); | 817 | if (!try_get_online_cpus()) { |
818 | /* CPU-hotplug operation in flight, fall back to normal GP. */ | ||
819 | wait_rcu_gp(call_rcu); | ||
820 | return; | ||
821 | } | ||
823 | 822 | ||
824 | /* | 823 | /* |
825 | * Acquire lock, falling back to synchronize_rcu() if too many | 824 | * Acquire lock, falling back to synchronize_rcu() if too many |