History

netxen: fix race in skb->len access

As soon as skb is given to hardware, TX completion can free skb under us. Therefore, we should update dev stats before kicking the device.

Eric Dumazet committed 15 years ago

Commit c82b9d71 parent 44da29d1 file · +2 −2Browse files

Unified · Split

drivers/net/netxen/netxen_nic_main.c+2−2
@@ -1965,11 +1965,11 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) · 1964 unmodified lines
19651965
19661966 netxen_tso_check(netdev, tx_ring, first_desc, skb);
19671967
1968− netxen_nic_update_cmd_producer(adapter, tx_ring);
1969−
19701968 adapter->stats.txbytes += skb->len;
19711969 adapter->stats.xmitcalled++;
19721970
1971+ netxen_nic_update_cmd_producer(adapter, tx_ring);
1972+
19731973 return NETDEV_TX_OK;
19741974
19751975 drop_packet:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t