Skip to contentSkip to conversation

net/core: neighbour update Oops

PATCH In review Doug Kehn 3 participants 3 messages Jul 13, 2010 – Jul 15, 2010

Subsystems (2)
lore
Share & tools
lore

Doug Kehn

author
#0 lore raw

PATCH 1/1 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.

---
 net/core/neighbour.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
net/core/neighbour.c +4 -1
index 6ba1c0e..a4e0a74 100644
@@ -949,7 +949,10 @@ static void neigh_update_hhs(struct neighbour *neigh)
 {
 	struct hh_cache *hh;
 	void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
-		= neigh->dev->header_ops->cache_update;
+		= NULL;
+
+	if (neigh->dev->header_ops)
+		update = neigh->dev->header_ops->cache_update;
 
 	if (update) {
 		for (hh = neigh->hh; hh; hh = hh->hh_next) {
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Doug Kehn

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;

Quoted 7 lines

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.

Quoted 20 lines
---
 net/core/neighbour.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
net/core/neighbour.c +4 -1
index 6ba1c0e..a4e0a74 100644
@@ -949,7 +949,10 @@ static void neigh_update_hhs(struct neighbour *neigh)
 {
 	struct hh_cache *hh;
 	void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
-		= neigh->dev->header_ops->cache_update;
+		= NULL;
+
+	if (neigh->dev->header_ops)
+		update = neigh->dev->header_ops->cache_update;
 
 	if (update) {
 		for (hh = neigh->hh; hh; hh = hh->hh_next) {
maintainer
#2 lore raw

From: Eric Dumazet <[email protected]>
Date: Tue, 13 Jul 2010 17:38:31 +0200

Quoted 13 lines · Doug Kehn
Quoted 12 lines

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.

Quoted 5 lines
Quoted 3 lines

This Oops was first observed in kernel version 2.6.26.8.

Applied and queued up for -stable, thanks!