All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 10/10] forcedeth: work around NULL skb dereference crash
@ 2007-03-27  5:47 akpm
  2007-04-02 11:53 ` Ingo Molnar
  0 siblings, 1 reply; 7+ messages in thread
From: akpm @ 2007-03-27  5:47 UTC (permalink / raw)
  To: jeff; +Cc: netdev, akpm, mingo, aabdulla

From: Ingo Molnar <mingo@elte.hu>

work around a NULL skb dereference crash that occurs during high load.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-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;
 				}
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-04-06 10:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27  5:47 [patch 10/10] forcedeth: work around NULL skb dereference crash akpm
2007-04-02 11:53 ` Ingo Molnar
2007-04-02 17:34   ` Ayaz Abdulla
2007-04-02 19:10     ` Ingo Molnar
2007-04-03  6:26     ` Ingo Molnar
2007-04-03  7:05       ` [bug] forcedeth: hung interface under load Ingo Molnar
2007-04-06 10:51         ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.