]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: free the skb after clearing the bitlock
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 10 May 2018 12:59:48 +0000 (05:59 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 14 May 2018 14:05:16 +0000 (07:05 -0700)
commite58f72e55cb01c91d5370497431d9806a020cbed
tree23db4d15f15a1c9a42f453db4c9e2d2c36ca3e1e
parent224fa84c850d7969b75171811253c6cc10878bec
i40e: free the skb after clearing the bitlock

In commit 55d8b9d27c01 ("i40e: fix race condition with PTP_TX_IN_PROGRESS
bits") we modified the code which handles Tx timestamps so that we would
clear the progress bit as soon as possible.

A later commit 2ce1a359797b ("i40e: check for Tx timestamp timeouts during
watchdog") introduced similar code for detecting and handling cleanup of
a blocked Tx timestamp. This code did not use the same pattern for cleaning
up the skb.

Update this code to wait to free the skb until after the bit lock is
free, by first setting the ptp_tx_skb to NULL and clearing the lock.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ptp.c