i40e: Fix missing rtnl locking when setting up pf switch
authorJan Sokolowski <jan.sokolowski@intel.com>
Fri, 11 Jun 2021 10:01:41 +0000 (12:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:27 +0000 (16:56 +0200)
commitcad22e48cabe00e055c6ae7999fc3487e422471c
treed7f40cdb18ebd8d91262dfe6bee85415eec25ea8
parentd9a5d19706eada82bbeaa1706b09583b3abb7e62
i40e: Fix missing rtnl locking when setting up pf switch

[ Upstream commit 956e759d5f8e0859e86b951a8779c60af633aafd ]

A recent change that made i40e use new udp_tunnel infrastructure
uses a method that expects to be called under rtnl lock.

However, not all codepaths do the lock prior to calling
i40e_setup_pf_switch.

Fix that by adding additional rtnl locking and unlocking.

Fixes: 40a98cb6f01f ("i40e: convert to new udp_tunnel infrastructure")
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_main.c