]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.32.17/net-core-neighbour-update-oops.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.17 / net-core-neighbour-update-oops.patch
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
5
6 From: Doug Kehn <rdkehn@yahoo.com>
7
8 commit 91a72a70594e5212c97705ca6a694bd307f7a26b upstream.
9
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
14
15 void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
16 = neigh->dev->header_ops->cache_update;
17
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.
21
22 This Oops was first observed in kernel version 2.6.26.8.
23
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>
28
29 ---
30 net/core/neighbour.c | 5 ++++-
31 1 file changed, 4 insertions(+), 1 deletion(-)
32
33 --- a/net/core/neighbour.c
34 +++ b/net/core/neighbour.c
35 @@ -945,7 +945,10 @@ static void neigh_update_hhs(struct neig
36 {
37 struct hh_cache *hh;
38 void (*update)(struct hh_cache*, const struct net_device*, const unsigned char *)
39 - = neigh->dev->header_ops->cache_update;
40 + = NULL;
41 +
42 + if (neigh->dev->header_ops)
43 + update = neigh->dev->header_ops->cache_update;
44
45 if (update) {
46 for (hh = neigh->hh; hh; hh = hh->hh_next) {