Commit a415d73c authored by Nicholas Nunley's avatar Nicholas Nunley Committed by Luo Gengkun
Browse files

iavf: free q_vectors before queues in iavf_disable_vf

mainline inclusion
from mainline-v5.16-rc2
commit 89f22f12
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9FNG0
CVE: CVE-2021-47201

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=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: 65c7006f ("i40evf: assign num_active_queues inside i40evf_alloc_queues")
Signed-off-by: default avatarNicholas Nunley <nicholas.d.nunley@intel.com>
Tested-by: default avatarTony Brelinski <tony.brelinski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>

Conflicts:
	drivers/net/ethernet/intel/i40evf/i40evf_main.c

Signed-off-by: default avatarLuo Gengkun <luogengkun2@huawei.com>
parent ab9b23cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment