diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:32 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:21 -0400 |
commit | 1a8eaf0733ca754533a03d6cfa4463def2b81ce3 (patch) | |
tree | be806212d9109703e0d5d56708ff2efdf65c3d46 /net/batman-adv/bridge_loop_avoidance.c | |
parent | 9563877ea52ea18bb4f1ed724c5e3a39bbbcf60b (diff) |
batman-adv: Prefix hash 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>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index b0561e338ae5..eb2178951c39 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -1166,8 +1166,8 @@ int batadv_bla_init(struct bat_priv *bat_priv) | |||
1166 | if (bat_priv->claim_hash) | 1166 | if (bat_priv->claim_hash) |
1167 | return 0; | 1167 | return 0; |
1168 | 1168 | ||
1169 | bat_priv->claim_hash = hash_new(128); | 1169 | bat_priv->claim_hash = batadv_hash_new(128); |
1170 | bat_priv->backbone_hash = hash_new(32); | 1170 | bat_priv->backbone_hash = batadv_hash_new(32); |
1171 | 1171 | ||
1172 | if (!bat_priv->claim_hash || !bat_priv->backbone_hash) | 1172 | if (!bat_priv->claim_hash || !bat_priv->backbone_hash) |
1173 | return -ENOMEM; | 1173 | return -ENOMEM; |
@@ -1348,12 +1348,12 @@ void batadv_bla_free(struct bat_priv *bat_priv) | |||
1348 | 1348 | ||
1349 | if (bat_priv->claim_hash) { | 1349 | if (bat_priv->claim_hash) { |
1350 | bla_purge_claims(bat_priv, primary_if, 1); | 1350 | bla_purge_claims(bat_priv, primary_if, 1); |
1351 | hash_destroy(bat_priv->claim_hash); | 1351 | batadv_hash_destroy(bat_priv->claim_hash); |
1352 | bat_priv->claim_hash = NULL; | 1352 | bat_priv->claim_hash = NULL; |
1353 | } | 1353 | } |
1354 | if (bat_priv->backbone_hash) { | 1354 | if (bat_priv->backbone_hash) { |
1355 | bla_purge_backbone_gw(bat_priv, 1); | 1355 | bla_purge_backbone_gw(bat_priv, 1); |
1356 | hash_destroy(bat_priv->backbone_hash); | 1356 | batadv_hash_destroy(bat_priv->backbone_hash); |
1357 | bat_priv->backbone_hash = NULL; | 1357 | bat_priv->backbone_hash = NULL; |
1358 | } | 1358 | } |
1359 | if (primary_if) | 1359 | if (primary_if) |