diff options
author | Doug Kehn <rdkehn@yahoo.com> | 2010-07-14 21:02:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-14 21:02:16 -0400 |
commit | 91a72a70594e5212c97705ca6a694bd307f7a26b (patch) | |
tree | 98e86dae9f15d98b199c96e18128a71155ce0e8e /net/core/neighbour.c | |
parent | 87fd308cfc6b2e880bf717a740bd5c58d2aed10c (diff) |
net/core: neighbour update Oops
When configuring DMVPN (GRE + openNHRP) and a GRE remote
address is configured a kernel Oops is observed. The
obserseved Oops is caused by a NULL header_ops pointer
(neigh->dev->header_ops) in neigh_update_hhs() when
void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
= neigh->dev->header_ops->cache_update;
is executed. The dev associated with the NULL header_ops is
the GRE interface. This patch guards against the
possibility that header_ops is NULL.
This Oops was first observed in kernel version 2.6.26.8.
Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 6ba1c0eece03..a4e0a7482c2b 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -949,7 +949,10 @@ static void neigh_update_hhs(struct neighbour *neigh) | |||
949 | { | 949 | { |
950 | struct hh_cache *hh; | 950 | struct hh_cache *hh; |
951 | void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *) | 951 | void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *) |
952 | = neigh->dev->header_ops->cache_update; | 952 | = NULL; |
953 | |||
954 | if (neigh->dev->header_ops) | ||
955 | update = neigh->dev->header_ops->cache_update; | ||
953 | 956 | ||
954 | if (update) { | 957 | if (update) { |
955 | for (hh = neigh->hh; hh; hh = hh->hh_next) { | 958 | for (hh = neigh->hh; hh; hh = hh->hh_next) { |