]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/net/ethernet/intel/iavf/iavf_main.c
iavf: free q_vectors before queues in iavf_disable_vf
authorNicholas Nunley <nicholas.d.nunley@intel.com>
Fri, 4 Jun 2021 16:48:54 +0000 (09:48 -0700)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:49 +0000 (09:48 +0100)
commitf0d8f34429894334b433048ed963acc41d15151d
treeedc41156201aa9a27f14b1ce2660490d1a3354cb
parentcba429c62b2422c27ff37e91b00d9ab4d6847e77
iavf: free q_vectors before queues in iavf_disable_vf

BugLink: https://bugs.launchpad.net/bugs/1952579
[ Upstream commit 89f22f129696ab53cfbc608e0a2184d0fea46ac1 ]

iavf_free_queues() clears adapter->num_active_queues, which
iavf_free_q_vectors() relies on, so swap the order of these two function
calls in iavf_disable_vf(). This resolves a panic encountered when the
interface is disabled and then later brought up again after PF
communication is restored.

Fixes: 65c7006f234c ("i40evf: assign num_active_queues inside i40evf_alloc_queues")
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Tested-by: Tony Brelinski <tony.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/net/ethernet/intel/iavf/iavf_main.c