aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorMichal Kubeček <mkubecek@suse.cz>2016-12-16 10:13:51 +0000
committerMister Oyster <oysterized@gmail.com>2017-04-11 10:58:33 +0200
commite13b8cced6a0a4832b9648aa9f9cb30780509716 (patch)
tree19486cb6141b77e7ef43e1415b74b0bfca5aafc4 /include/net
parentd2e89682a942fd6d5b2da9e639fa06f58f6926d9 (diff)
ipv6: don't call fib6_run_gc() until routing is ready
commit 2c861cc65ef4604011a0082e4dcdba2819aa191a upstream. When loading the ipv6 module, ndisc_init() is called before ip6_route_init(). As the former registers a handler calling fib6_run_gc(), this opens a window to run the garbage collector before necessary data structures are initialized. If a network device is initialized in this window, adding MAC address to it triggers a NETDEV_CHANGEADDR event, leading to a crash in fib6_clean_all(). Take the event handler registration out of ndisc_init() into a separate function ndisc_late_init() and move it after ip6_route_init(). Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net> Cc: <stable@vger.kernel.org> # 3.10.y Signed-off-by: Mike Manning <mmanning@brocade.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ndisc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 5a0aaf08c..8ef5c9baa 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -190,7 +190,9 @@ static inline struct neighbour *__ipv6_neigh_lookup(struct net_device *dev, cons
}
extern int ndisc_init(void);
+extern int ndisc_late_init(void);
+extern void ndisc_late_cleanup(void);
extern void ndisc_cleanup(void);
extern int ndisc_rcv(struct sk_buff *skb);