Skip to content

Commit 156baec

Browse files
paulmckmartinkpetersen
authored andcommitted
rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules
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 <Bart.VanAssche@wdc.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent fa576b4 commit 156baec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/rcu/update.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,13 @@ void init_rcu_head(struct rcu_head *head)
422422
{
423423
debug_object_init(head, &rcuhead_debug_descr);
424424
}
425+
EXPORT_SYMBOL_GPL(init_rcu_head);
425426

426427
void destroy_rcu_head(struct rcu_head *head)
427428
{
428429
debug_object_free(head, &rcuhead_debug_descr);
429430
}
431+
EXPORT_SYMBOL_GPL(destroy_rcu_head);
430432

431433
static bool rcuhead_is_static_object(void *addr)
432434
{

0 commit comments

Comments
 (0)