]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iavf: use mutexes for locking of critical sections
authorStefan Assmann <sassmann@kpanic.de>
Wed, 4 Aug 2021 08:22:24 +0000 (10:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:42:13 +0000 (13:42 +0200)
commit8f4dd6735ffee9239894ec808110d7886229ac26
tree9de04c640e621b20fa7a29a6c1e373236cf8f86c
parent7d6972d567f440ffba2a982475cc7e2ebe21bcec
iavf: use mutexes for locking of critical sections

[ Upstream commit 5ac49f3c2702f269d31cc37eb9308bc557953c4d ]

As follow-up to the discussion with Jakub Kicinski about iavf locking
being insufficient [1] convert iavf to use mutexes instead of bitops.
The locking logic is kept as is, just a drop-in replacement of
enum iavf_critical_section_t with separate mutexes.
The only difference is that the mutexes will be destroyed before the
module is unloaded.

[1] https://lwn.net/ml/netdev/20210316150210.00007249%40intel.com/

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/iavf/iavf.h
drivers/net/ethernet/intel/iavf/iavf_ethtool.c
drivers/net/ethernet/intel/iavf/iavf_main.c