Message ID | 20111019082826.GA31323@pandem0nium (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | 24ccf55154d49d78660a28f383664e938f9e97f2 |
Headers |
Return-Path: <simon.wunderlich@s2003.tu-chemnitz.de> Received: from cora.hrz.tu-chemnitz.de (cora.hrz.tu-chemnitz.de [134.109.228.40]) by open-mesh.org (Postfix) with ESMTPS id B5EE4600848 for <b.a.t.m.a.n@lists.open-mesh.org>; Wed, 19 Oct 2011 10:28:28 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@tu-chemnitz.de; dkim-adsp=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=43UuytQ2srRUWGsRetjr4CYxCPV0R+BGjL4qaeulf3w=; b=IGFPXakZcy9nm9ISuKZj3NQ76hUxo3I+BFr2gfO5Obc+ur3qJ0y/wu/yJjUyc0YahLdxv2Ql4zZerq5Axwm93qNbTJPpPXDdZ+TldXWVmrcysAMc794HEnm7wosOww1Q763u9tKI6BYhAyqYcu4OteYWjlkTh5ydYIgCApKDD08=; Received: from p57aa10f6.dip0.t-ipconnect.de ([87.170.16.246] helo=pandem0nium) by cora.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from <simon.wunderlich@s2003.tu-chemnitz.de>) id 1RGRVj-00052g-QN for b.a.t.m.a.n@lists.open-mesh.org; Wed, 19 Oct 2011 10:28:28 +0200 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from <simon.wunderlich@s2003.tu-chemnitz.de>) id 1RGRVi-0008AI-Hb for b.a.t.m.a.n@lists.open-mesh.org; Wed, 19 Oct 2011 10:28:26 +0200 Date: Wed, 19 Oct 2011 10:28:26 +0200 From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> To: b.a.t.m.a.n@lists.open-mesh.org Message-ID: <20111019082826.GA31323@pandem0nium> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline Precedence: first-class Priority: normal User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -1.0 (-) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (-1.0 Punkte) Fragen an/questions to: Postmaster TU Chemnitz <postmaster@tu-chemnitz.de> * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP --- Ende Textanalyse X-Scan-Signature: 9d07cb7fdf33a498459ed645a19e7d68 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: add sanity check when removing global tts X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> X-List-Received-Date: Wed, 19 Oct 2011 08:28:29 -0000 |
Commit Message
Simon Wunderlich
Oct. 19, 2011, 8:28 a.m. UTC
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(-)
Comments
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
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];