[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200703270547.l2R5lTZg008278@shell0.pdx.osdl.net>
Date: Mon, 26 Mar 2007 21:47:29 -0800
From: akpm@...ux-foundation.org
To: jeff@...zik.org
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org, mingo@...e.hu,
aabdulla@...dia.com
Subject: [patch 10/10] forcedeth: work around NULL skb dereference crash
From: Ingo Molnar <mingo@...e.hu>
work around a NULL skb dereference crash that occurs during high load.
Signed-off-by: Ingo Molnar <mingo@...e.hu>
Cc: Ayaz Abdulla <aabdulla@...dia.com>
Cc: Jeff Garzik <jeff@...zik.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
drivers/net/forcedeth.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff -puN drivers/net/forcedeth.c~forcedeth-work-around-null-skb-dereference-crash drivers/net/forcedeth.c
--- a/drivers/net/forcedeth.c~forcedeth-work-around-null-skb-dereference-crash
+++ a/drivers/net/forcedeth.c
@@ -1902,6 +1902,16 @@ static void nv_tx_done(struct net_device
np->stats.tx_carrier_errors++;
np->stats.tx_errors++;
} else {
+ if (!np->get_tx_ctx->skb) {
+ printk("get_tx: %td, put_tx: "
+ "%td\n",
+ np->get_tx_ctx -
+ np->first_tx_ctx,
+ np->put_tx_ctx -
+ np->first_tx_ctx);
+ WARN_ON(1);
+ break;
+ }
np->stats.tx_packets++;
np->stats.tx_bytes += np->get_tx_ctx->skb->len;
}
@@ -1917,6 +1927,16 @@ static void nv_tx_done(struct net_device
np->stats.tx_carrier_errors++;
np->stats.tx_errors++;
} else {
+ if (!np->get_tx_ctx->skb) {
+ printk("get_tx: %td, put_tx: "
+ "%td\n",
+ np->get_tx_ctx -
+ np->first_tx_ctx,
+ np->put_tx_ctx -
+ np->first_tx_ctx);
+ WARN_ON(1);
+ break;
+ }
np->stats.tx_packets++;
np->stats.tx_bytes += np->get_tx_ctx->skb->len;
}
_
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists