From: Jason Gunthorpe <jgg@mellanox.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"dledford@redhat.com" <dledford@redhat.com>,
"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Subject: Re: linux-next: build warning after merge of the rdma tree
Date: Thu, 26 Jul 2018 11:38:06 -0600 [thread overview]
Message-ID: <20180726173806.GG10178@mellanox.com> (raw)
In-Reply-To: <36211fbe8a548742cf8e41a57f02f81e55c86794.camel@wdc.com>
On Thu, Jul 26, 2018 at 05:10:13AM +0000, Bart Van Assche wrote:
> On Wed, 2018-07-25 at 21:05 -0600, Jason Gunthorpe wrote:
> > On Thu, Jul 26, 2018 at 10:55:53AM +1000, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > After merging the rdma tree, today's linux-next build (powerpc
> > > ppc64_defconfig) produced this warning:
> > >
> > > net/sunrpc/xprtrdma/svc_rdma_rw.c: In function 'svc_rdma_post_chunk_ctxt':
> > > net/sunrpc/xprtrdma/svc_rdma_rw.c:350:5: warning: 'bad_wr' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > > if (bad_wr != first_wr)
> > > ^
> >
> > Huh. I'm quite surprised 0-day build service didn't warn on this.
> >
> > > Introduced by commit
> > >
> > > ed288d74a9e5 ("net/xprtrdma: Simplify ib_post_(send|recv|srq_recv)() calls")
> > >
> > > This is an actual problem.
> >
> > Yes, for sure. Bart?
>
> Thanks Stephen for having reported this. I propose to revert the changes in
> net/sunrpc/xprtrdma/svc_rdma_rw.c. Jason, do you want me to submit the below
> as a formal patch?
I applied the below.. Please let me know if there is an error.
Thanks,
Jason
commit 5d85a822fae2b484f26ddb09815063a88962a0cb
Author: Jason Gunthorpe <jgg@mellanox.com>
Date: Thu Jul 26 11:36:50 2018 -0600
net/xprtrdma: Restore needed argument to ib_post_send
The call in svc_rdma_post_chunk_ctxt() does actually use bad_wr.
Fixes: ed288d74a9e5 ("net/xprtrdma: Simplify ib_post_(send|recv|srq_recv)() calls")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c
index 80975427f5235f..ce3ea841970483 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_rw.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c
@@ -329,7 +329,7 @@ static int svc_rdma_post_chunk_ctxt(struct svc_rdma_chunk_ctxt *cc)
do {
if (atomic_sub_return(cc->cc_sqecount,
&rdma->sc_sq_avail) > 0) {
- ret = ib_post_send(rdma->sc_qp, first_wr, NULL);
+ ret = ib_post_send(rdma->sc_qp, first_wr, &bad_wr);
trace_svcrdma_post_rw(&cc->cc_cqe,
cc->cc_sqecount, ret);
if (ret)
next prev parent reply other threads:[~2018-07-26 17:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 0:55 linux-next: build warning after merge of the rdma tree Stephen Rothwell
2018-07-26 3:05 ` Jason Gunthorpe
2018-07-26 5:10 ` Bart Van Assche
2018-07-26 17:38 ` Jason Gunthorpe [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-10 10:11 Stephen Rothwell
2021-02-10 13:47 ` Jason Gunthorpe
2021-02-10 17:17 ` Nathan Chancellor
2021-02-10 22:08 ` Lee Jones
2020-12-03 7:42 Stephen Rothwell
2020-12-03 9:39 ` Leon Romanovsky
2019-02-14 0:23 Stephen Rothwell
2019-02-14 0:18 Stephen Rothwell
2019-02-14 0:21 ` Doug Ledford
2019-02-14 12:35 ` Wan, Kaike
2018-07-10 1:28 Stephen Rothwell
2018-05-06 23:44 Stephen Rothwell
2018-05-14 18:03 ` Jason Gunthorpe
2018-05-14 18:09 ` Steve Wise
2018-05-14 20:29 ` Steve Wise
2018-05-06 23:40 Stephen Rothwell
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=20180726173806.GG10178@mellanox.com \
--to=jgg@mellanox.com \
--cc=Bart.VanAssche@wdc.com \
--cc=chuck.lever@oracle.com \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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.