From: Shannon Nelson Date: Thu, 28 Nov 2013 06:39:36 +0000 (+0000) Subject: i40e: catch unset q_vector X-Git-Tag: accepted/tizen/common/20141203.182822~719^2~281^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78681b1f875a9c20f9774af16fb927064f75b461;p=platform%2Fkernel%2Flinux-arm64.git 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 Signed-off-by: Jesse Brandeburg Tested-by: Kavindya Deegala Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 2785d7e..bfc3037 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -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 */