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
1965 1965
1966 netxen_tso_check(netdev, tx_ring, first_desc, skb);1966 netxen_tso_check(netdev, tx_ring, first_desc, skb);
1967 1967
1968 netxen_nic_update_cmd_producer(adapter, tx_ring);
1969
1970 adapter->stats.txbytes += skb->len;1968 adapter->stats.txbytes += skb->len;
1971 adapter->stats.xmitcalled++;1969 adapter->stats.xmitcalled++;
1972 1970
1971 netxen_nic_update_cmd_producer(adapter, tx_ring);
1972
1973 return NETDEV_TX_OK;1973 return NETDEV_TX_OK;
1974 1974
1975drop_packet:1975drop_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