]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:45 +0000 (14:20 +0100)
commit959bf45b52804684ce1a82a0ca2b109891df90e8
treefdb351b163c016a854b70fbce9d77512503fca58
parent272fef0cc75b9815e19075f4cb22409a9f7acd28
i40e: free the skb after clearing the bitlock

BugLink: http://bugs.launchpad.net/bugs/1815234
[ Upstream commit c79756cb5f084736b138da9319a02f7c72644548 ]

In commit bbc4e7d273b5 ("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 0bc0706b46cd ("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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/intel/i40e/i40e_ptp.c