diff options
author | Jesse Brandeburg | 2008-07-08 15:51:37 -0700 |
---|---|---|
committer | Jeff Garzik | 2008-07-11 01:20:27 -0400 |
commit | 34336635467c5102777ea8acf34fc8bf391f98c0 (patch) | |
tree | 62476f5b198ec0fc30bae6cf76628f1a07a246e6 /drivers/net/ixgb | |
parent | a65a604a01f710defe01f2322e108f4d8c20f6ce (diff) |
ixgb: move time stamp set before setting dma pointer
a user pointed out that setting variables out of order with respect
to the checks we make for tx timeout handling could result in a race
where ->dma was set but ->time_stamp was set to the old value.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 0e72dadf8b70..4bf6bbc65822 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -1290,12 +1290,12 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, buffer_info->length = size; WARN_ON(buffer_info->dma != 0); + buffer_info->time_stamp = jiffies; buffer_info->dma = pci_map_single(adapter->pdev, skb->data + offset, size, PCI_DMA_TODEVICE); - buffer_info->time_stamp = jiffies; buffer_info->next_to_watch = 0; len -= size; @@ -1322,13 +1322,13 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, size -= 4; buffer_info->length = size; + buffer_info->time_stamp = jiffies; buffer_info->dma = pci_map_page(adapter->pdev, frag->page, frag->page_offset + offset, size, PCI_DMA_TODEVICE); - buffer_info->time_stamp = jiffies; buffer_info->next_to_watch = 0; len -= size; |