linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: Bernard Metzler <bmt@zurich.ibm.com>, linux-rdma@vger.kernel.org
Cc: dan.carpenter@oracle.com, jgg@ziepe.ca
Subject: Re: [PATCH] siw: Fix potential NULL pointer in siw_connect().
Date: Tue, 20 Aug 2019 12:05:33 -0400	[thread overview]
Message-ID: <30814d3ca3b06c83b31f9255f140fdf2115e83e5.camel@redhat.com> (raw)
In-Reply-To: <20190819140257.19319-1-bmt@zurich.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 2195 bytes --]

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.

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-08-20 16:05 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 [this message]
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

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=30814d3ca3b06c83b31f9255f140fdf2115e83e5.camel@redhat.com \
    --to=dledford@redhat.com \
    --cc=bmt@zurich.ibm.com \
    --cc=dan.carpenter@oracle.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 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).