batman-adv: Prefix hard-interface non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:

committed by
Antonio Quartulli

parent
84d5e5e003
commit
9563877ea5
@@ -68,7 +68,7 @@ static int __init batman_init(void)
|
||||
bat_socket_init();
|
||||
batadv_debugfs_init();
|
||||
|
||||
register_netdevice_notifier(&hard_if_notifier);
|
||||
register_netdevice_notifier(&batadv_hard_if_notifier);
|
||||
|
||||
pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n",
|
||||
SOURCE_VERSION, COMPAT_VERSION);
|
||||
@@ -79,8 +79,8 @@ static int __init batman_init(void)
|
||||
static void __exit batman_exit(void)
|
||||
{
|
||||
batadv_debugfs_destroy();
|
||||
unregister_netdevice_notifier(&hard_if_notifier);
|
||||
hardif_remove_interfaces();
|
||||
unregister_netdevice_notifier(&batadv_hard_if_notifier);
|
||||
batadv_hardif_remove_interfaces();
|
||||
|
||||
flush_workqueue(bat_event_workqueue);
|
||||
destroy_workqueue(bat_event_workqueue);
|
||||
|
Reference in New Issue
Block a user