Commit 89f22f12 authored by Nicholas Nunley's avatar Nicholas Nunley Committed by Tony Nguyen
Browse files

iavf: free q_vectors before queues in iavf_disable_vf



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>
parent 8a4a126f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2123,8 +2123,8 @@ static void iavf_disable_vf(struct iavf_adapter *adapter)

	iavf_free_misc_irq(adapter);
	iavf_reset_interrupt_capability(adapter);
	iavf_free_queues(adapter);
	iavf_free_q_vectors(adapter);
	iavf_free_queues(adapter);
	memset(adapter->vf_res, 0, IAVF_VIRTCHNL_VF_RESOURCE_SIZE);
	iavf_shutdown_adminq(&adapter->hw);
	adapter->netdev->flags &= ~IFF_UP;