diff mbox

[net-next,10/16] i40e: add check for null VSI

Message ID 49FCCD093EDAFE45B73804AC3C1112E52E5CC6@ORSMSX116.amr.corp.intel.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Underwood, JohnX Feb. 19, 2016, 7:15 p.m. UTC
ACK

-----Original Message-----
From: Kirsher, Jeffrey T 
Sent: Friday, February 19, 2016 1:54 AM
To: davem@davemloft.net
Cc: Underwood, JohnX; netdev@vger.kernel.org; nhorman@redhat.com; sassmann@redhat.com; jogreene@redhat.com; Kirsher, Jeffrey T
Subject: [net-next 10/16] i40e: add check for null VSI

From: John Underwood <johnx.underwood@intel.com>

Return from i40e_vsi_reinit_setup() if vsi param is NULL.
This makes this code consistent with all the other code that checks for NULL before using one of the VSI pointers accessed with an indexed variable. (Indexed VSI pointers are intentionally set to NULL in i40e_vsi_clear() and i40e_remove().

Change-ID: I3bc8b909c70fd2439334eeae994d151f61480985
Signed-off-by: John Underwood <johnx.underwood@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

David Miller Feb. 19, 2016, 7:41 p.m. UTC | #1
From: "Underwood, JohnX" <johnx.underwood@intel.com>
Date: Fri, 19 Feb 2016 19:15:53 +0000

> ACK

You should never top-post on this mailing list.

But in this specific case it is even more important.

So just in case it is not clear:

	Please, pretty please, DO NOT top-post ACKs to patches like this.

It looks like a new, fresh, patch submission to patchwork therefore you
are creating a significant burdon for me.

Thanks.
Kirsher, Jeffrey T Feb. 19, 2016, 7:48 p.m. UTC | #2
On Fri, 2016-02-19 at 14:41 -0500, David Miller wrote:
> From: "Underwood, JohnX" <johnx.underwood@intel.com>
> Date: Fri, 19 Feb 2016 19:15:53 +0000
> 
> > ACK
> 
> You should never top-post on this mailing list.
> 
> But in this specific case it is even more important.
> 
> So just in case it is not clear:
> 
>         Please, pretty please, DO NOT top-post ACKs to patches like
> this.
> 
> It looks like a new, fresh, patch submission to patchwork therefore
> you
> are creating a significant burdon for me.

Not to mention he was ACK'ing his own patch that he authored. :-(

Sorry Dave, I will work with him offline.
Underwood, JohnX Feb. 19, 2016, 7:51 p.m. UTC | #3
Sorry, folks.  I was confused.  The patch looked familiar, but I wasn't able to find the email where I originally sent it out.

-----Original Message-----
From: Kirsher, Jeffrey T 

Sent: Friday, February 19, 2016 11:49 AM
To: David Miller; Underwood, JohnX
Cc: netdev@vger.kernel.org; nhorman@redhat.com; sassmann@redhat.com; jogreene@redhat.com
Subject: Re: [net-next 10/16] i40e: add check for null VSI

On Fri, 2016-02-19 at 14:41 -0500, David Miller wrote:
> From: "Underwood, JohnX" <johnx.underwood@intel.com>

> Date: Fri, 19 Feb 2016 19:15:53 +0000

> 

> > ACK

> 

> You should never top-post on this mailing list.

> 

> But in this specific case it is even more important.

> 

> So just in case it is not clear:

> 

>         Please, pretty please, DO NOT top-post ACKs to patches like 

> this.

> 

> It looks like a new, fresh, patch submission to patchwork therefore 

> you are creating a significant burdon for me.


Not to mention he was ACK'ing his own patch that he authored. :-(

Sorry Dave, I will work with him offline.
David Miller Feb. 19, 2016, 8:57 p.m. UTC | #4
From: "Underwood, JohnX" <johnx.underwood@intel.com>
Date: Fri, 19 Feb 2016 19:51:39 +0000

> Sorry, folks.  I was confused.  The patch looked familiar, but I
> wasn't able to find the email where I originally sent it out.

Please stop top-posting!!!!

Quote the relevant material, then add your response, not the other way around!
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 05def9f..3ff3e83 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9583,10 +9583,15 @@  vector_setup_out:
  **/
 static struct i40e_vsi *i40e_vsi_reinit_setup(struct i40e_vsi *vsi)  {
-	struct i40e_pf *pf = vsi->back;
+	struct i40e_pf *pf;
 	u8 enabled_tc;
 	int ret;
 
+	if (!vsi)
+		return NULL;
+
+	pf = vsi->back;
+
 	i40e_put_lump(pf->qp_pile, vsi->base_queue, vsi->idx);
 	i40e_vsi_clear_rings(vsi);
 
--
2.5.0