rcu: Add exports for per-CPU variables used for inlining
The new rcu_read_lock_nesting and rcu_read_unlock_special per-CPU
variables need to be accessible from modules to allow rcu_read_lock()
and rcu_read_unlock() to continue to be used from modules. This
commit therefore adds the needed EXPORT_PER_CPU_SYMBOL_GPL()s.
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index d52c68e..ef83774 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -53,7 +53,9 @@
#ifdef CONFIG_PREEMPT_RCU
DEFINE_PER_CPU(int, rcu_read_lock_nesting);
+EXPORT_PER_CPU_SYMBOL_GPL(rcu_read_lock_nesting);
DEFINE_PER_CPU(int, rcu_read_unlock_special);
+EXPORT_PER_CPU_SYMBOL_GPL(rcu_read_unlock_special);
#ifdef CONFIG_PROVE_RCU
DEFINE_PER_CPU(struct task_struct *, rcu_current_task);
#endif /* #ifdef CONFIG_PROVE_RCU */