]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/rcutree_plugin.h
futex: Fix errors in nested key ref-counting
[karo-tx-linux.git] / kernel / rcutree_plugin.h
index ac7d80fa895c60a1ba9db239db9a8c5e804a53f3..0e4f420245d97369b7fdf6bb99815789ffe13233 100644 (file)
@@ -557,11 +557,13 @@ void synchronize_rcu(void)
        if (!rcu_scheduler_active)
                return;
 
+       init_rcu_head_on_stack(&rcu.head);
        init_completion(&rcu.completion);
        /* Will wake me after RCU finished. */
        call_rcu(&rcu.head, wakeme_after_rcu);
        /* Wait for it. */
        wait_for_completion(&rcu.completion);
+       destroy_rcu_head_on_stack(&rcu.head);
 }
 EXPORT_SYMBOL_GPL(synchronize_rcu);