All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bernard Metzler" <BMT@zurich.ibm.com>
To: "Doug Ledford" <dledford@redhat.com>
Cc: linux-rdma@vger.kernel.org, dan.carpenter@oracle.com, jgg@ziepe.ca
Subject: Re: Re: [PATCH] siw: Fix potential NULL pointer in siw_connect().
Date: Tue, 20 Aug 2019 16:11:58 +0000	[thread overview]
Message-ID: <OF86B144B0.ABBDC503-ON0025845C.0058FCC1-0025845C.0058FCC7@notes.na.collabserv.com> (raw)
In-Reply-To: <30814d3ca3b06c83b31f9255f140fdf2115e83e5.camel@redhat.com>

-----"Doug Ledford" <dledford@redhat.com> wrote: -----

>To: "Bernard Metzler" <bmt@zurich.ibm.com>,
>linux-rdma@vger.kernel.org
>From: "Doug Ledford" <dledford@redhat.com>
>Date: 08/20/2019 06:05PM
>Cc: dan.carpenter@oracle.com, jgg@ziepe.ca
>Subject: [EXTERNAL] Re: [PATCH] siw: Fix potential NULL pointer in
>siw_connect().
>
>On Mon, 2019-08-19 at 16:02 +0200, Bernard Metzler wrote:
>> Fixes: 6c52fdc244b5 ("rdma/siw: connection management")
>> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
>> ---
>>  drivers/infiniband/sw/siw/siw_cm.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/infiniband/sw/siw/siw_cm.c
>> b/drivers/infiniband/sw/siw/siw_cm.c
>> index 9ce8a1b925d2..fc97571a640b 100644
>> --- a/drivers/infiniband/sw/siw/siw_cm.c
>> +++ b/drivers/infiniband/sw/siw/siw_cm.c
>> @@ -1515,7 +1515,7 @@ int siw_connect(struct iw_cm_id *id, struct
>> iw_cm_conn_param *params)
>>  		}
>>  	}
>>  error:
>> -	siw_dbg_qp(qp, "failed: %d\n", rv);
>> +	siw_dbg(id->device, "failed: %d\n", rv);
>>  
>>  	if (cep) {
>>  		siw_socket_disassoc(s);
>> @@ -1540,7 +1540,8 @@ int siw_connect(struct iw_cm_id *id, struct
>> iw_cm_conn_param *params)
>>  	} else if (s) {
>>  		sock_release(s);
>>  	}
>> -	siw_qp_put(qp);
>> +	if (qp)
>> +		siw_qp_put(qp);
>>  
>>  	return rv;
>>  }
>
>Hi Bernard,
>
>We try to avoid empty commit messages.  I know in this case the
>subject
>really carries the important info, but it looks better when
>displaying
>the commit if there is something in the message body.
>
>Also, please preface the subject with RDMA/siw: as we like to have
>the
>RDMA subsystem preface the individual subcomponent element in the
>subject line (some people still use IB, which is what used to be
>preferred, but RDMA is preferred today).
>
>I fixed both of those things up and applied this to for-rc, thanks.
>
>Please take a look (I pushed it out to my wip/dl-for-rc branch) so
>you
>can see what I mean about how to make both a simple subject line and
>a
>decent commit message.  Also, no final punctuation on the subject
>line,
>and try to keep the subject length <= 50 chars total.  If you have to
>go
>over to have a decent subject, then so be it, but we strive for that
>50
>char limit to make a subject stay on one line when displayed using
>git
>log --oneline.
>

Hi Doug,

I'll print that email and put it at the wall, right above the screen.
Thanks so much for making it clear even to people like me!

Best regards,
Bernard


      parent reply	other threads:[~2019-08-20 16:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 14:02 [PATCH] siw: Fix potential NULL pointer in siw_connect() Bernard Metzler
2019-08-20 16:05 ` Doug Ledford
2019-08-21 12:56   ` Dan Carpenter
2019-08-21 13:39     ` Doug Ledford
2019-08-21 14:12       ` Jason Gunthorpe
2019-08-21 16:30         ` Leon Romanovsky
2019-08-22  6:35         ` Gal Pressman
2019-08-22  7:10         ` Dan Carpenter
2019-08-22 12:02           ` Jason Gunthorpe
2019-08-22 15:02             ` Doug Ledford
2019-08-20 16:11 ` Bernard Metzler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF86B144B0.ABBDC503-ON0025845C.0058FCC1-0025845C.0058FCC7@notes.na.collabserv.com \
    --to=bmt@zurich.ibm.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.