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 siwu@hrz.tu-chemnitz.de --- translation-table.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/translation-table.c b/translation-table.c index c2af2b1..ffa846c 100644 --- a/translation-table.c +++ b/translation-table.c @@ -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];
Hello,
On Wed, Oct 19, 2011 at 10:28:26AM +0200, Simon Wunderlich wrote:
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 siwu@hrz.tu-chemnitz.de
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!
On 23.10.2011 11:38, Antonio Quartulli wrote:
Hello,
On Wed, Oct 19, 2011 at 10:28:26AM +0200, Simon Wunderlich wrote:
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 siwu@hrz.tu-chemnitz.de
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!
tested-by: Alexey Fisher bug-track@fisher-privat.net
On Sunday, October 23, 2011 11:42:25 Alexey Fisher wrote:
On 23.10.2011 11:38, Antonio Quartulli wrote:
Hello,
On Wed, Oct 19, 2011 at 10:28:26AM +0200, Simon Wunderlich wrote:
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 siwu@hrz.tu-chemnitz.de
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!
tested-by: Alexey Fisher bug-track@fisher-privat.net
Patch was applied in revision 4c7d468.
Thanks, Marek
b.a.t.m.a.n@lists.open-mesh.org