It could be the case that the user tries to disable DAT when it is already disabled. To prevent kernel oops, batadv_dat_hash_free() has to check for the hash table pointer being different from NULL before to try to free it.
This was introduced by ("batman-adv: Distributed ARP Table - add runtime switch")
Signed-off-by: Antonio Quartulli ordex@autistici.org --- distributed-arp-table.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/distributed-arp-table.c b/distributed-arp-table.c index c933615..0fea29a 100644 --- a/distributed-arp-table.c +++ b/distributed-arp-table.c @@ -634,6 +634,9 @@ out: */ static void batadv_dat_hash_free(struct batadv_priv *bat_priv) { + if (!bat_priv->dat.hash) + return; + __batadv_dat_purge(bat_priv, NULL);
batadv_hash_destroy(bat_priv->dat.hash);
On Monday, October 29, 2012 22:38:08 Antonio Quartulli wrote:
It could be the case that the user tries to disable DAT when it is already disabled. To prevent kernel oops, batadv_dat_hash_free() has to check for the hash table pointer being different from NULL before to try to free it.
This was introduced by ("batman-adv: Distributed ARP Table - add runtime switch")
Signed-off-by: Antonio Quartulli ordex@autistici.org
distributed-arp-table.c | 3 +++ 1 file changed, 3 insertions(+)
Applied in revision 59f8434.
Thanks, Marek
b.a.t.m.a.n@lists.open-mesh.org