netdev
[Top] [All Lists]

Re: [TRIVIAL] Fix recent bug in fib_semantics.c

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [TRIVIAL] Fix recent bug in fib_semantics.c
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Fri, 17 Sep 2004 23:31:08 -0700
Cc: jonsmirl@xxxxxxxxx, david@xxxxxxxxxxxxxxxxxxxxx, akpm@xxxxxxxx, trivial@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040918041627.GA12356@gondor.apana.org.au>
References: <9e47339104091717215e9be08b@mail.gmail.com> <E1C8T4t-0006ug-00@gondolin.me.apana.org.au> <9e473391040917183726113e91@mail.gmail.com> <20040918041627.GA12356@gondor.apana.org.au>
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, 18 Sep 2004 14:16:28 +1000
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:

> Thanks.  The following bug is probably your problem.

Good catch on this fix, but really he's hitting the
BUG_ON() in fib_sync_down()  (I hate i386 backtraces,
it's an art to decode them properly)

So if you rmmod() a device before any routes are ever
created in ipv4, this triggers.  I didn't think this
was possible, but it is.

The fix is simple enough.

===== net/ipv4/fib_semantics.c 1.16 vs edited =====
--- 1.16/net/ipv4/fib_semantics.c       2004-09-17 11:11:04 -07:00
+++ edited/net/ipv4/fib_semantics.c     2004-09-17 23:14:44 -07:00
@@ -1040,9 +1040,7 @@
        if (force)
                scope = -1;
 
-       BUG_ON(!fib_info_laddrhash);
-
-       if (local) {
+       if (local && fib_info_laddrhash) {
                unsigned int hash = fib_laddr_hashfn(local);
                struct hlist_head *head = &fib_info_laddrhash[hash];
                struct hlist_node *node;

<Prev in Thread] Current Thread [Next in Thread>