Kernel panic - not syncing: Fatal Exception
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 Kernel panic - not syncing: Fatal Exception
Move kfree_skb which was causing memory corruption to new location, while still keeping appropriate return value for function __pppoe_xmit. Prevents memory corruption and consequent kernel panic when PPPoE peer terminates the link.
--- drivers/net/pppoe.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/pppoe.c +3 -2
@@ -924,8 +924,10 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)/* Copy the data if there is no space for the header or if it's * read-only. */ -if (skb_cow_head (skb,sizeof (*ph) + dev->hard_header_len)) +if (skb_cow_head (skb,sizeof (*ph) + dev->hard_header_len)) { +kfree_skb (skb); goto abort; + }__skb_push (skb,sizeof (*ph));skb_reset_network_header (skb);
@@ -947,7 +949,6 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)return 1 ; abort: -kfree_skb (skb);return 0 ; }
---
Andrej Ota.
Quoted 1 line · Andrej Ota
Move
kfree_skbwhich was causing memory corruption to new location, while still keeping appropriate return value for function__pppoe_xmit. Prevents memory corruption and consequent kernel panic when PPPoE peer terminates the link.
Andrej, a slight misunderstanding - probably I should be more explicit. I sent this link, which explains why return shouldn't be zero:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=db7bf6d97c6956b7eb0f22131cb5c37bd41f33c0
So the simplest fix is to revert this one change only.
If you disagree with this let me know.
You should also fix the subject to something more meaningful, e.g.:
[PATCH] pppoe: Fix kernel panic caused by __pppoe_xmit
Please, break lines in the changelog around 70 lines and add it fixes commit 55c95e738da85373965cb03b4f975d0fd559865b.
Thanks,
Jarek P.
Quoted 34 lines
Signed-off-by Andrej Ota [[email protected]]Reported-by Pawel Staszewski [[email protected]]--- drivers/net/pppoe.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/net/pppoe.c +3
-3@@ -924,8 +924,10 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)/* Copy the data if there is no space for the header or if it's * read-only. */ -if (skb_cow_head (skb,sizeof (*ph) + dev->hard_header_len)) +if (skb_cow_head (skb,sizeof (*ph) + dev->hard_header_len)) { +kfree_skb (skb); goto abort; + }__skb_push (skb,sizeof (*ph));skb_reset_network_header (skb);@@ -947,7 +949,6 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)return 1 ; abort: -kfree_skb (skb);return 0 ; } ---Andrej Ota.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH] pppoe.c: Fix kernel panic caused by __pppoe_xmit
Quoted 10 lines · Andrej Ota
__pppoe_xmitfunction return value was invalid resulting in additional call tokfree_skbon already freed skb. This resulted in memory corruption and consequent kernel panic after PPPoE peer terminated the link.This fixes commit
55c95e738da85373965cb03b4f975d0fd559865b.Signed-off-by Jarek Poplawski [[email protected]]Signed-off-by Andrej Ota [[email protected]]Reported-by Pawel Staszewski [[email protected]]
Thanks Andrej! I've only updated emails a bit.
Jarek P.
Re: [PATCH] pppoe.c: Fix kernel panic caused by __pppoe_xmit
Quoted 1 line
Thanks Andrej! I've only updated emails a bit.
Thank you for your help and support in submitting this patch.
Andrej Ota.
Re: [PATCH] pppoe.c: Fix kernel panic caused by __pppoe_xmit
From: Andrej Ota <[email protected]>
Date: Sun, 12 Dec 2010 00:23:16 +0100
Quoted 3 lines
Quoted 1 line
Thanks Andrej! I've only updated emails a bit.
Thank you for your help and support in submitting this patch.
Applied, thanks everyone.
Re: [PATCH] pppoe.c: Fix kernel panic caused by __pppoe_xmit
In reply to Jarek PoplawskiQuoted 15 lines · On Saturday 11 December 2010 22:08:23 Jarek Poplawski wrote:
Quoted 10 lines · Andrej Ota
__pppoe_xmitfunction return value was invalid resulting in additional call tokfree_skbon already freed skb. This resulted in memory corruption and consequent kernel panic after PPPoE peer terminated the link.This fixes commit
55c95e738da85373965cb03b4f975d0fd559865b.Signed-off-by Jarek Poplawski [[email protected]]Signed-off-by Andrej Ota [[email protected]]Reported-by Pawel Staszewski [[email protected]]Thanks Andrej! I've only updated emails a bit.
Jarek P.
Quoted 10 lines
Reported-by Gorik Van Steenberge <[email protected]>Reported-by Daniel Kenzelmann <[email protected]>Reported-by Denys Fedoryshchenko <[email protected]>Reported-by Pawel Staszewski <[email protected]>Diagnosed-by Andrej Ota <[email protected]>Diagnosed-by Eric Dumazet <[email protected]>Tested-by Denys Fedoryshchenko <[email protected]>Tested-by Pawel Staszewski <[email protected]>Signed-off-by Jarek Poplawski <[email protected]>Signed-off-by Andrej Ota <[email protected]>
Thanks a lot!