From: Ingo Molnar <[EMAIL PROTECTED]>

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

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Cc: Ayaz Abdulla <[EMAIL PROTECTED]>
Cc: Jeff Garzik <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to