Commit face9279 authored by David S. Miller's avatar David S. Miller

[IPV4]: Fix BUG triggered in fib_sync_down()

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 910fe9cf
...@@ -1040,9 +1040,7 @@ int fib_sync_down(u32 local, struct net_device *dev, int force) ...@@ -1040,9 +1040,7 @@ int fib_sync_down(u32 local, struct net_device *dev, int force)
if (force) if (force)
scope = -1; scope = -1;
BUG_ON(!fib_info_laddrhash); if (local && fib_info_laddrhash) {
if (local) {
unsigned int hash = fib_laddr_hashfn(local); unsigned int hash = fib_laddr_hashfn(local);
struct hlist_head *head = &fib_info_laddrhash[hash]; struct hlist_head *head = &fib_info_laddrhash[hash];
struct hlist_node *node; struct hlist_node *node;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment