[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 1 Feb 2011 16:44:23 -0800 (PST)
From: Andi Kleen <andi@...stfloor.org>
To: davem@...emloft.net, nelhage@...lice.com, gregkh@...e.de,
ak@...ux.intel.com, linux-kernel@...r.kernel.org, stable@...nel.org
Subject: [PATCH] [67/139] econet: Fix crash in aun_incoming().
2.6.35-longterm review patch. If anyone has any objections, please let me know.
------------------
From: David S. Miller <davem@...emloft.net>
[ Upstream commit 4e085e76cbe558b79b54cbab772f61185879bc64 ]
Unconditional use of skb->dev won't work here,
try to fetch the econet device via skb_dst()->dev
instead.
Suggested by Eric Dumazet.
Reported-by: Nelson Elhage <nelhage@...lice.com>
Tested-by: Nelson Elhage <nelhage@...lice.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
net/econet/af_econet.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: linux-2.6.35.y/net/econet/af_econet.c
===================================================================
--- linux-2.6.35.y.orig/net/econet/af_econet.c
+++ linux-2.6.35.y/net/econet/af_econet.c
@@ -849,7 +849,11 @@ static void aun_incoming(struct sk_buff
unsigned char stn = ntohl(ip->saddr) & 0xff;
struct sock *sk;
struct sk_buff *newskb;
- struct ec_device *edev = skb->dev->ec_ptr;
+ struct dst_entry *dst = skb_dst(skb);
+ struct ec_device *edev = NULL;
+
+ if (dst)
+ edev = dst->dev->ec_ptr;
if (! edev)
goto bad;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists