From: Paul E. McKenney Date: Thu, 7 Dec 2017 17:40:38 +0000 (-0800) Subject: rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules X-Git-Tag: v4.14.20~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce6faf10fd6544febcf5c3efe453193def873c60;p=platform%2Fkernel%2Flinux-rpi.git rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules commit 156baec39732f025dc778e00da95fc10d6e45885 upstream. Use of init_rcu_head() and destroy_rcu_head() from modules results in the following build-time error with CONFIG_DEBUG_OBJECTS_RCU_HEAD=y: ERROR: "init_rcu_head" [drivers/scsi/scsi_mod.ko] undefined! ERROR: "destroy_rcu_head" [drivers/scsi/scsi_mod.ko] undefined! This commit therefore adds EXPORT_SYMBOL_GPL() for each to allow them to be used by GPL-licensed kernel modules. Reported-by: Bart Van Assche Reported-by: Stephen Rothwell Signed-off-by: Paul E. McKenney Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 5033b66..7a577bd 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -421,11 +421,13 @@ void init_rcu_head(struct rcu_head *head) { debug_object_init(head, &rcuhead_debug_descr); } +EXPORT_SYMBOL_GPL(init_rcu_head); void destroy_rcu_head(struct rcu_head *head) { debug_object_free(head, &rcuhead_debug_descr); } +EXPORT_SYMBOL_GPL(destroy_rcu_head); static bool rcuhead_is_static_object(void *addr) {