* [B.A.T.M.A.N.] [PATCH] batman-adv: add sanity check when removing global tts
@ 2011-10-19 8:28 Simon Wunderlich
2011-10-23 9:38 ` Antonio Quartulli
0 siblings, 1 reply; 4+ messages in thread
From: Simon Wunderlich @ 2011-10-19 8:28 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
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];
--
1.7.7
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: add sanity check when removing global tts
2011-10-19 8:28 [B.A.T.M.A.N.] [PATCH] batman-adv: add sanity check when removing global tts Simon Wunderlich
@ 2011-10-23 9:38 ` Antonio Quartulli
2011-10-23 9:42 ` Alexey Fisher
0 siblings, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2011-10-23 9:38 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
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!
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: add sanity check when removing global tts
2011-10-23 9:38 ` Antonio Quartulli
@ 2011-10-23 9:42 ` Alexey Fisher
2011-10-24 12:07 ` Marek Lindner
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Fisher @ 2011-10-23 9:42 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: add sanity check when removing global tts
2011-10-23 9:42 ` Alexey Fisher
@ 2011-10-24 12:07 ` Marek Lindner
0 siblings, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2011-10-24 12:07 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-24 12:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-19 8:28 [B.A.T.M.A.N.] [PATCH] batman-adv: add sanity check when removing global tts Simon Wunderlich
2011-10-23 9:38 ` Antonio Quartulli
2011-10-23 9:42 ` Alexey Fisher
2011-10-24 12:07 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox