batman-adv: add sanity check when removing global tts
PATCH 1/1 batman-adv: add sanity check when removing global tts
After removing the batman-adv module, the hash may be already gone when tt_global_del_orig() tries to clean the hash. This patch adds a sanity check to avoid this.
--- translation-table.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
translation-table.c +3 -0
@@ -712,6 +712,9 @@ void tt_global_del_orig(struct bat_priv *bat_priv,struct hlist_head *head;spinlock_t *list_lock;/* protects write access to the hash lists */ +if (!hash) +return ; +for (i =0 ; i < hash->size; i++) { head = &hash->table[i]; list_lock = &hash->list_locks[i];
Signature · 1 line
1.7.7
Hello,
Quoted 6 lines · Simon Wunderlich
After removing the batman-adv module, the hash may be already gone when
tt_global_del_orig()tries to clean the hash. This patch adds a sanity check to avoid this.Signed-off-by Simon Wunderlich <[email protected]>---
I got a feedback on IRC from fishor_ who said that the patch solved the kernel panic problem on module unload and on soft_iface deactivating.
Thank you for the patch Simon!
Signature · 4 lines
Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara
Alexey Fisher
Tested-byQuoted 7 lines · Antonio Quartulli
Hello,
Quoted 4 lines · Simon Wunderlich
After removing the batman-adv module, the hash may be already gone when
tt_global_del_orig()tries to clean the hash. This patch adds a sanity check to avoid this.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Simon Wunderlich <[email protected]>---
I got a feedback on IRC from
fishor_who said that the patch solved the kernel panic problem on module unload and onsoft_ifacedeactivating.Thank you for the patch Simon!
Quoted 11 lines · On Sunday, October 23, 2011 11:42:25 Alexey Fisher wrote:
Quoted 10 lines · Antonio Quartulli
Hello,
Quoted 6 lines · Simon Wunderlich
After removing the batman-adv module, the hash may be already gone when
tt_global_del_orig()tries to clean the hash. This patch adds a sanity check to avoid this.Signed-off-by Simon Wunderlich <[email protected]>---
Quoted 6 lines
Quoted 4 lines
I got a feedback on IRC from
fishor_who said that the patch solved the kernel panic problem on module unload and onsoft_ifacedeactivating.Thank you for the patch Simon!
Tested-by Alexey Fisher <[email protected]>
Patch was applied in revision 4c7d468.
Thanks,
Marek