aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-12-03 22:34:14 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-04 14:53:49 -0500
commit4352d82647f679fb8dd9440b34400fa49beedb2c (patch)
tree667455cf1c3fa8c3085c93bbf3e0755b6fb28fe6 /drivers/net
parentd30f53aeb31d453a5230f526bea592af07944564 (diff)
pasemi_mac: Fix reuse of free'd skb
Turns out we're freeing the skb when we detect CRC error, but we're not clearing out info->skb. We could either clear it and have the stack reallocate it, or just leave it and the rx ring refill code will reuse the one that was allocated. Reusing a freed skb obviously caused some nasty crashes of various kind, as reported by Brent Baude and David Woodhouse. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/pasemi_mac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index a8db5d7105fb..816a59e801b2 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -586,7 +586,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit)
586 /* CRC error flagged */ 586 /* CRC error flagged */
587 mac->netdev->stats.rx_errors++; 587 mac->netdev->stats.rx_errors++;
588 mac->netdev->stats.rx_crc_errors++; 588 mac->netdev->stats.rx_crc_errors++;
589 dev_kfree_skb_irq(skb); 589 /* No need to free skb, it'll be reused */
590 goto next; 590 goto next;
591 } 591 }
592 592