Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce6faf10 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Greg Kroah-Hartman
Browse files

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: default avatarBart Van Assche <Bart.VanAssche@wdc.com>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c561093e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -421,11 +421,13 @@ void init_rcu_head(struct rcu_head *head)
{
{
	debug_object_init(head, &rcuhead_debug_descr);
	debug_object_init(head, &rcuhead_debug_descr);
}
}
EXPORT_SYMBOL_GPL(init_rcu_head);


void destroy_rcu_head(struct rcu_head *head)
void destroy_rcu_head(struct rcu_head *head)
{
{
	debug_object_free(head, &rcuhead_debug_descr);
	debug_object_free(head, &rcuhead_debug_descr);
}
}
EXPORT_SYMBOL_GPL(destroy_rcu_head);


static bool rcuhead_is_static_object(void *addr)
static bool rcuhead_is_static_object(void *addr)
{
{