linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB/hfi1: Fix an error code in hfi1_vnic_init()
@ 2020-05-29 10:03 Dan Carpenter
  2020-05-29 13:34 ` Marciniszyn, Mike
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2020-05-29 10:03 UTC (permalink / raw)
  To: Mike Marciniszyn, Grzegorz Andrejczuk
  Cc: Dennis Dalessandro, Doug Ledford, Jason Gunthorpe, Ira Weiny,
	Vishwanathapura, Niranjana, Andrzej Kacprowski, linux-rdma,
	kernel-janitors

We should preserve the error code from hfi1_netdev_rx_init() but
currently the function returns success instead.

Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/infiniband/hw/hfi1/vnic_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c b/drivers/infiniband/hw/hfi1/vnic_main.c
index b183c56b7b6a4..f89d0cb1c7204 100644
--- a/drivers/infiniband/hw/hfi1/vnic_main.c
+++ b/drivers/infiniband/hw/hfi1/vnic_main.c
@@ -512,7 +512,8 @@ static int hfi1_vnic_init(struct hfi1_vnic_vport_info *vinfo)
 			goto txreq_fail;
 	}
 
-	if (hfi1_netdev_rx_init(dd)) {
+	rc = hfi1_netdev_rx_init(dd);
+	if (rc) {
 		dd_dev_err(dd, "Unable to initialize netdev contexts\n");
 		goto alloc_fail;
 	}
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* RE: [PATCH] IB/hfi1: Fix an error code in hfi1_vnic_init()
  2020-05-29 10:03 [PATCH] IB/hfi1: Fix an error code in hfi1_vnic_init() Dan Carpenter
@ 2020-05-29 13:34 ` Marciniszyn, Mike
  2020-05-30 14:02   ` [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling Dan Carpenter
  0 siblings, 1 reply; 10+ messages in thread
From: Marciniszyn, Mike @ 2020-05-29 13:34 UTC (permalink / raw)
  To: Dan Carpenter, Andrejczuk, Grzegorz
  Cc: Dalessandro, Dennis, Doug Ledford, Jason Gunthorpe, Weiny, Ira,
	Vishwanathapura, Niranjana, Kacprowski, Andrzej, linux-rdma,
	kernel-janitors

> From: Dan Carpenter <dan.carpenter@oracle.com>
> diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c
> b/drivers/infiniband/hw/hfi1/vnic_main.c
> index b183c56b7b6a4..f89d0cb1c7204 100644
> --- a/drivers/infiniband/hw/hfi1/vnic_main.c
> +++ b/drivers/infiniband/hw/hfi1/vnic_main.c
> @@ -512,7 +512,8 @@ static int hfi1_vnic_init(struct hfi1_vnic_vport_info
> *vinfo)
>  			goto txreq_fail;
>  	}
> 
> -	if (hfi1_netdev_rx_init(dd)) {
> +	rc = hfi1_netdev_rx_init(dd);
> +	if (rc) {
>  		dd_dev_err(dd, "Unable to initialize netdev contexts\n");
>  		goto alloc_fail;
>  	}

Dan,

This is definitely wrong, but another call to  hfi1_netdev_rx_init() exists in hfi1_vnic_up()  that needs to be fixed.

Can you address that too?

Mike

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
  2020-05-29 13:34 ` Marciniszyn, Mike
@ 2020-05-30 14:02   ` Dan Carpenter
  2020-05-31 10:05     ` Leon Romanovsky
  2020-06-01 14:14     ` Jason Gunthorpe
  0 siblings, 2 replies; 10+ messages in thread
From: Dan Carpenter @ 2020-05-30 14:02 UTC (permalink / raw)
  To: Mike Marciniszyn, Grzegorz Andrejczuk
  Cc: Dennis Dalessandro, Doug Ledford, Jason Gunthorpe, linux-rdma,
	kernel-janitors

The hfi1_vnic_up() function doesn't check whether hfi1_netdev_rx_init()
returns errors.  In hfi1_vnic_init() we need to change the code to
preserve the error code instead of returning success.

Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: Add error handling in hfi1_vnic_up() and add second fixes tag

 drivers/infiniband/hw/hfi1/vnic_main.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c b/drivers/infiniband/hw/hfi1/vnic_main.c
index b183c56b7b6a4..03f8be8e9488e 100644
--- a/drivers/infiniband/hw/hfi1/vnic_main.c
+++ b/drivers/infiniband/hw/hfi1/vnic_main.c
@@ -457,13 +457,19 @@ static int hfi1_vnic_up(struct hfi1_vnic_vport_info *vinfo)
 	if (rc < 0)
 		return rc;
 
-	hfi1_netdev_rx_init(dd);
+	rc = hfi1_netdev_rx_init(dd);
+	if (rc < 0)
+		goto err_remove;
 
 	netif_carrier_on(netdev);
 	netif_tx_start_all_queues(netdev);
 	set_bit(HFI1_VNIC_UP, &vinfo->flags);
 
 	return 0;
+
+err_remove:
+	hfi1_netdev_remove_data(dd, VNIC_ID(vinfo->vesw_id));
+	return rc;
 }
 
 static void hfi1_vnic_down(struct hfi1_vnic_vport_info *vinfo)
@@ -512,7 +518,8 @@ static int hfi1_vnic_init(struct hfi1_vnic_vport_info *vinfo)
 			goto txreq_fail;
 	}
 
-	if (hfi1_netdev_rx_init(dd)) {
+	rc = hfi1_netdev_rx_init(dd);
+	if (rc) {
 		dd_dev_err(dd, "Unable to initialize netdev contexts\n");
 		goto alloc_fail;
 	}
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
  2020-05-30 14:02   ` [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling Dan Carpenter
@ 2020-05-31 10:05     ` Leon Romanovsky
  2020-05-31 17:36       ` Dan Carpenter
  2020-06-01 14:14     ` Jason Gunthorpe
  1 sibling, 1 reply; 10+ messages in thread
From: Leon Romanovsky @ 2020-05-31 10:05 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Mike Marciniszyn, Grzegorz Andrejczuk, Dennis Dalessandro,
	Doug Ledford, Jason Gunthorpe, linux-rdma, kernel-janitors

On Sat, May 30, 2020 at 05:02:24PM +0300, Dan Carpenter wrote:
> The hfi1_vnic_up() function doesn't check whether hfi1_netdev_rx_init()
> returns errors.  In hfi1_vnic_init() we need to change the code to
> preserve the error code instead of returning success.
>
> Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
> Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: Add error handling in hfi1_vnic_up() and add second fixes tag
>
>  drivers/infiniband/hw/hfi1/vnic_main.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c b/drivers/infiniband/hw/hfi1/vnic_main.c
> index b183c56b7b6a4..03f8be8e9488e 100644
> --- a/drivers/infiniband/hw/hfi1/vnic_main.c
> +++ b/drivers/infiniband/hw/hfi1/vnic_main.c
> @@ -457,13 +457,19 @@ static int hfi1_vnic_up(struct hfi1_vnic_vport_info *vinfo)
>  	if (rc < 0)
>  		return rc;
>
> -	hfi1_netdev_rx_init(dd);
> +	rc = hfi1_netdev_rx_init(dd);
> +	if (rc < 0)
> +		goto err_remove;

Why did you check for the negative value here and didn't check below?

Thanks

>
>  	netif_carrier_on(netdev);
>  	netif_tx_start_all_queues(netdev);
>  	set_bit(HFI1_VNIC_UP, &vinfo->flags);
>
>  	return 0;
> +
> +err_remove:
> +	hfi1_netdev_remove_data(dd, VNIC_ID(vinfo->vesw_id));
> +	return rc;
>  }
>
>  static void hfi1_vnic_down(struct hfi1_vnic_vport_info *vinfo)
> @@ -512,7 +518,8 @@ static int hfi1_vnic_init(struct hfi1_vnic_vport_info *vinfo)
>  			goto txreq_fail;
>  	}
>
> -	if (hfi1_netdev_rx_init(dd)) {
> +	rc = hfi1_netdev_rx_init(dd);
> +	if (rc) {
>  		dd_dev_err(dd, "Unable to initialize netdev contexts\n");
>  		goto alloc_fail;
>  	}
> --
> 2.26.2
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
  2020-05-31 10:05     ` Leon Romanovsky
@ 2020-05-31 17:36       ` Dan Carpenter
  2020-06-01  4:24         ` Leon Romanovsky
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2020-05-31 17:36 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Mike Marciniszyn, Grzegorz Andrejczuk, Dennis Dalessandro,
	Doug Ledford, Jason Gunthorpe, linux-rdma, kernel-janitors

On Sun, May 31, 2020 at 01:05:12PM +0300, Leon Romanovsky wrote:
> On Sat, May 30, 2020 at 05:02:24PM +0300, Dan Carpenter wrote:
> > The hfi1_vnic_up() function doesn't check whether hfi1_netdev_rx_init()
> > returns errors.  In hfi1_vnic_init() we need to change the code to
> > preserve the error code instead of returning success.
> >
> > Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
> > Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > v2: Add error handling in hfi1_vnic_up() and add second fixes tag
> >
> >  drivers/infiniband/hw/hfi1/vnic_main.c | 11 +++++++++--
> >  1 file changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c b/drivers/infiniband/hw/hfi1/vnic_main.c
> > index b183c56b7b6a4..03f8be8e9488e 100644
> > --- a/drivers/infiniband/hw/hfi1/vnic_main.c
> > +++ b/drivers/infiniband/hw/hfi1/vnic_main.c
> > @@ -457,13 +457,19 @@ static int hfi1_vnic_up(struct hfi1_vnic_vport_info *vinfo)
> >  	if (rc < 0)
> >  		return rc;
> >
> > -	hfi1_netdev_rx_init(dd);
> > +	rc = hfi1_netdev_rx_init(dd);
> > +	if (rc < 0)
> > +		goto err_remove;
> 
> Why did you check for the negative value here and didn't check below?
> 

I just copied the pattern in the nearest code.  I didn't realize until
now that it was different in both functions...  The checking isn't done
consistently in this file.

I can resend on Tuesday though if you want.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
  2020-05-31 17:36       ` Dan Carpenter
@ 2020-06-01  4:24         ` Leon Romanovsky
  2020-06-01 12:27           ` Jason Gunthorpe
  0 siblings, 1 reply; 10+ messages in thread
From: Leon Romanovsky @ 2020-06-01  4:24 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Mike Marciniszyn, Grzegorz Andrejczuk, Dennis Dalessandro,
	Doug Ledford, Jason Gunthorpe, linux-rdma, kernel-janitors

On Sun, May 31, 2020 at 08:36:55PM +0300, Dan Carpenter wrote:
> On Sun, May 31, 2020 at 01:05:12PM +0300, Leon Romanovsky wrote:
> > On Sat, May 30, 2020 at 05:02:24PM +0300, Dan Carpenter wrote:
> > > The hfi1_vnic_up() function doesn't check whether hfi1_netdev_rx_init()
> > > returns errors.  In hfi1_vnic_init() we need to change the code to
> > > preserve the error code instead of returning success.
> > >
> > > Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
> > > Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > ---
> > > v2: Add error handling in hfi1_vnic_up() and add second fixes tag
> > >
> > >  drivers/infiniband/hw/hfi1/vnic_main.c | 11 +++++++++--
> > >  1 file changed, 9 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c b/drivers/infiniband/hw/hfi1/vnic_main.c
> > > index b183c56b7b6a4..03f8be8e9488e 100644
> > > --- a/drivers/infiniband/hw/hfi1/vnic_main.c
> > > +++ b/drivers/infiniband/hw/hfi1/vnic_main.c
> > > @@ -457,13 +457,19 @@ static int hfi1_vnic_up(struct hfi1_vnic_vport_info *vinfo)
> > >  	if (rc < 0)
> > >  		return rc;
> > >
> > > -	hfi1_netdev_rx_init(dd);
> > > +	rc = hfi1_netdev_rx_init(dd);
> > > +	if (rc < 0)
> > > +		goto err_remove;
> >
> > Why did you check for the negative value here and didn't check below?
> >
>
> I just copied the pattern in the nearest code.  I didn't realize until
> now that it was different in both functions...  The checking isn't done
> consistently in this file.
>
> I can resend on Tuesday though if you want.

I imagine that Jason will fix it once he will apply the patch.

Thanks

>
> regards,
> dan carpenter
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
  2020-06-01  4:24         ` Leon Romanovsky
@ 2020-06-01 12:27           ` Jason Gunthorpe
  2020-06-01 12:49             ` Wan, Kaike
  0 siblings, 1 reply; 10+ messages in thread
From: Jason Gunthorpe @ 2020-06-01 12:27 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Dan Carpenter, Mike Marciniszyn, Grzegorz Andrejczuk,
	Dennis Dalessandro, Doug Ledford, linux-rdma, kernel-janitors

On Mon, Jun 01, 2020 at 07:24:33AM +0300, Leon Romanovsky wrote:
> On Sun, May 31, 2020 at 08:36:55PM +0300, Dan Carpenter wrote:
> > On Sun, May 31, 2020 at 01:05:12PM +0300, Leon Romanovsky wrote:
> > > On Sat, May 30, 2020 at 05:02:24PM +0300, Dan Carpenter wrote:
> > > > The hfi1_vnic_up() function doesn't check whether hfi1_netdev_rx_init()
> > > > returns errors.  In hfi1_vnic_init() we need to change the code to
> > > > preserve the error code instead of returning success.
> > > >
> > > > Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
> > > > Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > > v2: Add error handling in hfi1_vnic_up() and add second fixes tag
> > > >
> > > >  drivers/infiniband/hw/hfi1/vnic_main.c | 11 +++++++++--
> > > >  1 file changed, 9 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c b/drivers/infiniband/hw/hfi1/vnic_main.c
> > > > index b183c56b7b6a4..03f8be8e9488e 100644
> > > > +++ b/drivers/infiniband/hw/hfi1/vnic_main.c
> > > > @@ -457,13 +457,19 @@ static int hfi1_vnic_up(struct hfi1_vnic_vport_info *vinfo)
> > > >  	if (rc < 0)
> > > >  		return rc;
> > > >
> > > > -	hfi1_netdev_rx_init(dd);
> > > > +	rc = hfi1_netdev_rx_init(dd);
> > > > +	if (rc < 0)
> > > > +		goto err_remove;
> > >
> > > Why did you check for the negative value here and didn't check below?
> > >
> >
> > I just copied the pattern in the nearest code.  I didn't realize until
> > now that it was different in both functions...  The checking isn't done
> > consistently in this file.
> >
> > I can resend on Tuesday though if you want.
> 
> I imagine that Jason will fix it once he will apply the patch.

If someone from hfi says which is the right one, sure..

Jason

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
  2020-06-01 12:27           ` Jason Gunthorpe
@ 2020-06-01 12:49             ` Wan, Kaike
  0 siblings, 0 replies; 10+ messages in thread
From: Wan, Kaike @ 2020-06-01 12:49 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky
  Cc: Dan Carpenter, Marciniszyn, Mike, Andrejczuk, Grzegorz,
	Dalessandro, Dennis, Doug Ledford, linux-rdma, kernel-janitors



> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org <linux-rdma-
> owner@vger.kernel.org> On Behalf Of Jason Gunthorpe
> Sent: Monday, June 01, 2020 8:27 AM
> To: Leon Romanovsky <leon@kernel.org>
> Cc: Dan Carpenter <dan.carpenter@oracle.com>; Marciniszyn, Mike
> <mike.marciniszyn@intel.com>; Andrejczuk, Grzegorz
> <grzegorz.andrejczuk@intel.com>; Dalessandro, Dennis
> <dennis.dalessandro@intel.com>; Doug Ledford <dledford@redhat.com>;
> linux-rdma@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: Re: [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
> 
> On Mon, Jun 01, 2020 at 07:24:33AM +0300, Leon Romanovsky wrote:
> > On Sun, May 31, 2020 at 08:36:55PM +0300, Dan Carpenter wrote:
> > > On Sun, May 31, 2020 at 01:05:12PM +0300, Leon Romanovsky wrote:
> > > > On Sat, May 30, 2020 at 05:02:24PM +0300, Dan Carpenter wrote:
> > > > > The hfi1_vnic_up() function doesn't check whether
> > > > > hfi1_netdev_rx_init() returns errors.  In hfi1_vnic_init() we
> > > > > need to change the code to preserve the error code instead of
> returning success.
> > > > >
> > > > > Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface
> > > > > Controller (VNIC) HW support")
> > > > > Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> > > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > > > v2: Add error handling in hfi1_vnic_up() and add second fixes
> > > > > tag
> > > > >
> > > > >  drivers/infiniband/hw/hfi1/vnic_main.c | 11 +++++++++--
> > > > >  1 file changed, 9 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c
> > > > > b/drivers/infiniband/hw/hfi1/vnic_main.c
> > > > > index b183c56b7b6a4..03f8be8e9488e 100644
> > > > > +++ b/drivers/infiniband/hw/hfi1/vnic_main.c
> > > > > @@ -457,13 +457,19 @@ static int hfi1_vnic_up(struct
> hfi1_vnic_vport_info *vinfo)
> > > > >  	if (rc < 0)
> > > > >  		return rc;
> > > > >
> > > > > -	hfi1_netdev_rx_init(dd);
> > > > > +	rc = hfi1_netdev_rx_init(dd);
> > > > > +	if (rc < 0)
Please use:  if (rc)

Thanks,

Kaike
> > > > > +		goto err_remove;
> > > >
> > > > Why did you check for the negative value here and didn't check below?
> > > >
> > >
> > > I just copied the pattern in the nearest code.  I didn't realize
> > > until now that it was different in both functions...  The checking
> > > isn't done consistently in this file.
> > >
> > > I can resend on Tuesday though if you want.
> >
> > I imagine that Jason will fix it once he will apply the patch.
> 
> If someone from hfi says which is the right one, sure..
> 
> Jason

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
  2020-05-30 14:02   ` [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling Dan Carpenter
  2020-05-31 10:05     ` Leon Romanovsky
@ 2020-06-01 14:14     ` Jason Gunthorpe
  2020-06-01 18:01       ` Dan Carpenter
  1 sibling, 1 reply; 10+ messages in thread
From: Jason Gunthorpe @ 2020-06-01 14:14 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Mike Marciniszyn, Grzegorz Andrejczuk, Dennis Dalessandro,
	Doug Ledford, linux-rdma, kernel-janitors

On Sat, May 30, 2020 at 05:02:24PM +0300, Dan Carpenter wrote:
> The hfi1_vnic_up() function doesn't check whether hfi1_netdev_rx_init()
> returns errors.  In hfi1_vnic_init() we need to change the code to
> preserve the error code instead of returning success.
> 
> Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
> Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: Add error handling in hfi1_vnic_up() and add second fixes tag
> 
>  drivers/infiniband/hw/hfi1/vnic_main.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)

Applied to for-next with the 'if (rc)' fixup, thanks

Jason

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling
  2020-06-01 14:14     ` Jason Gunthorpe
@ 2020-06-01 18:01       ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2020-06-01 18:01 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Mike Marciniszyn, Grzegorz Andrejczuk, Dennis Dalessandro,
	Doug Ledford, linux-rdma, kernel-janitors

On Mon, Jun 01, 2020 at 11:14:50AM -0300, Jason Gunthorpe wrote:
> On Sat, May 30, 2020 at 05:02:24PM +0300, Dan Carpenter wrote:
> > The hfi1_vnic_up() function doesn't check whether hfi1_netdev_rx_init()
> > returns errors.  In hfi1_vnic_init() we need to change the code to
> > preserve the error code instead of returning success.
> > 
> > Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
> > Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > v2: Add error handling in hfi1_vnic_up() and add second fixes tag
> > 
> >  drivers/infiniband/hw/hfi1/vnic_main.c | 11 +++++++++--
> >  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> Applied to for-next with the 'if (rc)' fixup, thanks

Thanks.  I would have resent it, but it's a three day weekend here...

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-06-01 18:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 10:03 [PATCH] IB/hfi1: Fix an error code in hfi1_vnic_init() Dan Carpenter
2020-05-29 13:34 ` Marciniszyn, Mike
2020-05-30 14:02   ` [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling Dan Carpenter
2020-05-31 10:05     ` Leon Romanovsky
2020-05-31 17:36       ` Dan Carpenter
2020-06-01  4:24         ` Leon Romanovsky
2020-06-01 12:27           ` Jason Gunthorpe
2020-06-01 12:49             ` Wan, Kaike
2020-06-01 14:14     ` Jason Gunthorpe
2020-06-01 18:01       ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).