* [PATCH net-next-2.6] net/core: neighbour update Oops
@ 2010-07-13 15:23 Doug Kehn
2010-07-13 15:38 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Doug Kehn @ 2010-07-13 15:23 UTC (permalink / raw)
To: davem; +Cc: netdev, eric.dumazet
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>
---
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 6ba1c0e..a4e0a74 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -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) {
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next-2.6] net/core: neighbour update Oops
2010-07-13 15:23 [PATCH net-next-2.6] net/core: neighbour update Oops Doug Kehn
@ 2010-07-13 15:38 ` Eric Dumazet
2010-07-15 1:02 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2010-07-13 15:38 UTC (permalink / raw)
To: Doug Kehn; +Cc: davem, netdev
Le mardi 13 juillet 2010 à 08:23 -0700, Doug Kehn a écrit :
> 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>
> ---
> 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 6ba1c0e..a4e0a74 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -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) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next-2.6] net/core: neighbour update Oops
2010-07-13 15:38 ` Eric Dumazet
@ 2010-07-15 1:02 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-07-15 1:02 UTC (permalink / raw)
To: eric.dumazet; +Cc: rdkehn, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 13 Jul 2010 17:38:31 +0200
> Le mardi 13 juillet 2010 à 08:23 -0700, Doug Kehn a écrit :
>> 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>
Applied and queued up for -stable, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-15 1:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13 15:23 [PATCH net-next-2.6] net/core: neighbour update Oops Doug Kehn
2010-07-13 15:38 ` Eric Dumazet
2010-07-15 1:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).