kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] RDMA/rvt: Improve exception handling in rvt_create_qp()
@ 2020-06-13  7:15 Markus Elfring
  2020-06-14  7:15 ` Greg KH
  2020-06-14 18:18 ` Markus Elfring
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Elfring @ 2020-06-13  7:15 UTC (permalink / raw)
  To: Aditya Pakki, linux-rdma
  Cc: kernel-janitors, linux-kernel, Dennis Dalessandro, Doug Ledford,
	Jason Gunthorpe, Kangjie Lu, Mike Marciniszyn, Qiushi Wu

> … The patch fixes this issue by
> calling rvt_free_rq().

I suggest to choose another imperative wording for your change description.
Will the tag “Fixes” become helpful for the commit message?

…
> +++ b/drivers/infiniband/sw/rdmavt/qp.c
> @@ -1203,6 +1203,7 @@  struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
>  			qp->s_flags = RVT_S_SIGNAL_REQ_WR;
>  		err = alloc_ud_wq_attr(qp, rdi->dparms.node);
>  		if (err) {
> +			rvt_free_rq(&qp->r_rq);
>  			ret = (ERR_PTR(err));
>  			goto bail_driver_priv;
>  		}

How do you think about the following code variant with the addition
of a jump target?

 		err = alloc_ud_wq_attr(qp, rdi->dparms.node);
 		if (err) {
 			ret = (ERR_PTR(err));
-			goto bail_driver_priv;
+			goto bail_free_rq;
 		}

…

 bail_rq_wq:
-	rvt_free_rq(&qp->r_rq);
 	free_ud_wq_attr(qp);
+
+bail_free_rq:
+	rvt_free_rq(&qp->r_rq);

 bail_driver_priv:


Regards,
Markus

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

* Re: [PATCH] RDMA/rvt: Improve exception handling in rvt_create_qp()
  2020-06-13  7:15 [PATCH] RDMA/rvt: Improve exception handling in rvt_create_qp() Markus Elfring
@ 2020-06-14  7:15 ` Greg KH
  2020-06-14 18:18 ` Markus Elfring
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-06-14  7:15 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Aditya Pakki, linux-rdma, kernel-janitors, linux-kernel,
	Dennis Dalessandro, Doug Ledford, Jason Gunthorpe, Kangjie Lu,
	Mike Marciniszyn, Qiushi Wu

On Sat, Jun 13, 2020 at 09:15:12AM +0200, Markus Elfring wrote:
> > … The patch fixes this issue by
> > calling rvt_free_rq().
> 
> I suggest to choose another imperative wording for your change description.
> Will the tag “Fixes” become helpful for the commit message?
> 
> …
> > +++ b/drivers/infiniband/sw/rdmavt/qp.c
> > @@ -1203,6 +1203,7 @@  struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
> >  			qp->s_flags = RVT_S_SIGNAL_REQ_WR;
> >  		err = alloc_ud_wq_attr(qp, rdi->dparms.node);
> >  		if (err) {
> > +			rvt_free_rq(&qp->r_rq);
> >  			ret = (ERR_PTR(err));
> >  			goto bail_driver_priv;
> >  		}
> 
> How do you think about the following code variant with the addition
> of a jump target?
> 
>  		err = alloc_ud_wq_attr(qp, rdi->dparms.node);
>  		if (err) {
>  			ret = (ERR_PTR(err));
> -			goto bail_driver_priv;
> +			goto bail_free_rq;
>  		}
> 
> …
> 
>  bail_rq_wq:
> -	rvt_free_rq(&qp->r_rq);
>  	free_ud_wq_attr(qp);
> +
> +bail_free_rq:
> +	rvt_free_rq(&qp->r_rq);
> 
>  bail_driver_priv:
> 
> 
> Regards,
> Markus

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list.  I strongly suggest that you not do this anymore.  Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all.  The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback.  Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot

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

* Re: [PATCH] RDMA/rvt: Improve exception handling in rvt_create_qp()
  2020-06-13  7:15 [PATCH] RDMA/rvt: Improve exception handling in rvt_create_qp() Markus Elfring
  2020-06-14  7:15 ` Greg KH
@ 2020-06-14 18:18 ` Markus Elfring
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2020-06-14 18:18 UTC (permalink / raw)
  To: Aditya Pakki, Dennis Dalessandro, linux-rdma
  Cc: kernel-janitors, linux-kernel, Doug Ledford, Jason Gunthorpe,
	Kangjie Lu, Mike Marciniszyn, Qiushi Wu

> …
>> +++ b/drivers/infiniband/sw/rdmavt/qp.c
>> @@ -1203,6 +1203,7 @@  struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
>>  			qp->s_flags = RVT_S_SIGNAL_REQ_WR;
>>  		err = alloc_ud_wq_attr(qp, rdi->dparms.node);
>>  		if (err) {
>> +			rvt_free_rq(&qp->r_rq);
>>  			ret = (ERR_PTR(err));
>>  			goto bail_driver_priv;
>>  		}
>
> How do you think about the following code variant with the addition
> of a jump target?
>
>  		err = alloc_ud_wq_attr(qp, rdi->dparms.node);
>  		if (err) {
>  			ret = (ERR_PTR(err));
> -			goto bail_driver_priv;
> +			goto bail_free_rq;
>  		}
>
> …
>
>  bail_rq_wq:
> -	rvt_free_rq(&qp->r_rq);
>  	free_ud_wq_attr(qp);
> +
> +bail_free_rq:
> +	rvt_free_rq(&qp->r_rq);
>
>  bail_driver_priv:

The improvement of affected implementation details is continued with
another update suggestion.

RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq
https://lore.kernel.org/linux-rdma/20200614041148.131983-1-pakki001@umn.edu/
https://lore.kernel.org/patchwork/patch/1255709/

Regards,
Markus

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13  7:15 [PATCH] RDMA/rvt: Improve exception handling in rvt_create_qp() Markus Elfring
2020-06-14  7:15 ` Greg KH
2020-06-14 18:18 ` Markus Elfring

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).