1 From 91a72a70594e5212c97705ca6a694bd307f7a26b Mon Sep 17 00:00:00 2001
2 From: Doug Kehn <rdkehn@yahoo.com>
3 Date: Wed, 14 Jul 2010 18:02:16 -0700
4 Subject: net/core: neighbour update Oops
6 From: Doug Kehn <rdkehn@yahoo.com>
8 commit 91a72a70594e5212c97705ca6a694bd307f7a26b upstream.
10 When configuring DMVPN (GRE + openNHRP) and a GRE remote
11 address is configured a kernel Oops is observed. The
12 obserseved Oops is caused by a NULL header_ops pointer
13 (neigh->dev->header_ops) in neigh_update_hhs() when
15 void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
16 = neigh->dev->header_ops->cache_update;
18 is executed. The dev associated with the NULL header_ops is
19 the GRE interface. This patch guards against the
20 possibility that header_ops is NULL.
22 This Oops was first observed in kernel version 2.6.26.8.
24 Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
25 Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
26 Signed-off-by: David S. Miller <davem@davemloft.net>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
30 net/core/neighbour.c | 5 ++++-
31 1 file changed, 4 insertions(+), 1 deletion(-)
33 --- a/net/core/neighbour.c
34 +++ b/net/core/neighbour.c
35 @@ -945,7 +945,10 @@ static void neigh_update_hhs(struct neig
38 void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
39 - = neigh->dev->header_ops->cache_update;
42 + if (neigh->dev->header_ops)
43 + update = neigh->dev->header_ops->cache_update;
46 for (hh = neigh->hh; hh; hh = hh->hh_next) {