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

From: David S. Miller
Date: Sat Sep 18 2004 - 01:36:57 EST


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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/