mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
i40e: catch unset q_vector
Don't try to free a q_vector that hasn't been set up as it can panic the kernel. Change-Id: I0650cc6c441d0779788c522c790293c276d14fbc Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
90bb776ae5
commit
78681b1f87
1 changed files with 2 additions and 1 deletions
|
@ -3153,7 +3153,8 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi)
|
|||
u16 vector = i + base;
|
||||
|
||||
/* free only the irqs that were actually requested */
|
||||
if (vsi->q_vectors[i]->num_ringpairs == 0)
|
||||
if (!vsi->q_vectors[i] ||
|
||||
!vsi->q_vectors[i]->num_ringpairs)
|
||||
continue;
|
||||
|
||||
/* clear the affinity_mask in the IRQ descriptor */
|
||||
|
|
Loading…
Add table
Reference in a new issue