[lkml]   [2001]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectUsing alloc_skb causes memory corruption in 2.4.4
I get severe memory corruption when forwarding packets from eth1 to eth0,
where eth0 is a 3Com 905C-TX (zc, hw checksumming), and eth1 is a Davicom
9102. In every case it is the last two bytes of a 4096-byte block that
have been cleared.

To make a long bug hunting story short, the eth1 driver (dmfe) uses
alloc_skb for skbuf allocation, and if I change it into dev_alloc_skb, the
problem disappears.

Did I find the real problem, or did I just hide it?


diff -ru linux-2.4.4.orig/drivers/net/dmfe.c linux-2.4.4/drivers/net/dmfe.c
--- linux-2.4.4.orig/drivers/net/dmfe.c Sat Apr 28 11:41:49 2001
+++ linux-2.4.4/drivers/net/dmfe.c Mon Apr 30 15:15:02 2001
@@ -1306,7 +1306,7 @@
rxptr = db->rx_insert_ptr;

while (db->rx_avail_cnt < RX_DESC_CNT) {
- if ((skb = alloc_skb(RX_ALLOC_SIZE, GFP_ATOMIC)) == NULL)
+ if ((skb = dev_alloc_skb(RX_ALLOC_SIZE)) == NULL)
rxptr->rx_skb_ptr = (u32) skb;
rxptr->rdes2 = virt_to_bus(skb->tail);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.137 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site