When enable CONFIG_PROVE_RCU and built modules, the following error appear: ERROR: modpost: "srcu_check_nmi_safety" [kernel/rcu/rcutorture.ko] undefined! ERROR: modpost: "srcu_check_nmi_safety" [kernel/rcu/rcuscale.ko] undefined! This commit fix it by exporting the srcu_check_nmi_safety(). Signed-off-by: Zqiang <qiang1.zhang@xxxxxxxxx> --- kernel/rcu/srcutree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c index 382236dd5e46..bcd629f5f902 100644 --- a/kernel/rcu/srcutree.c +++ b/kernel/rcu/srcutree.c @@ -651,6 +651,7 @@ void srcu_check_nmi_safety(struct srcu_struct *ssp, bool nmi_safe) } WARN_ONCE(old_nmi_safe_mask != nmi_safe_mask, "CPU %d old state %d new state %d\n", sdp->cpu, old_nmi_safe_mask, nmi_safe_mask); } +EXPORT_SYMBOL_GPL(srcu_check_nmi_safety); #endif /* CONFIG_PROVE_RCU */ /* -- 2.25.1