Skip to content

Commit

Permalink
rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
paulmck authored and martinkpetersen committed Dec 8, 2017
1 parent fa576b4 commit 156baec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/rcu/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,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)
{
Expand Down

0 comments on commit 156baec

Please sign in to comment.