]> git.hungrycats.org Git - linux/commitdiff
[IPV4]: Fix BUG triggered in fib_sync_down()
authorDavid S. Miller <davem@nuts.davemloft.net>
Fri, 17 Sep 2004 16:17:16 +0000 (09:17 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Fri, 17 Sep 2004 16:17:16 +0000 (09:17 -0700)
If you modload then unload a network device,
without creating any ipv4 routes, it is possible
for the laddr hash to be not allocated yet
in fib_semantics.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c

index 6407193bdc05460230265d41de73636a0293c73b..df9dd16f6e2bc3ba198a277a351ac7ac80890be9 100644 (file)
@@ -1040,9 +1040,7 @@ int fib_sync_down(u32 local, struct net_device *dev, int force)
        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;