-----"Doug Ledford" <dledford@xxxxxxxxxx> wrote: ----- >To: "Bernard Metzler" <bmt@xxxxxxxxxxxxxx>, >linux-rdma@xxxxxxxxxxxxxxx >From: "Doug Ledford" <dledford@xxxxxxxxxx> >Date: 08/20/2019 06:05PM >Cc: dan.carpenter@xxxxxxxxxx, jgg@xxxxxxxx >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@xxxxxxxxxx> >> Signed-off-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx> >> --- >> 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