linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the rdma tree
@ 2020-12-03  7:42 Stephen Rothwell
  2020-12-03  9:39 ` Leon Romanovsky
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2020-12-03  7:42 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Jason Gunthorpe, Jason Gunthorpe, Leon Romanovsky,
	Leon Romanovsky, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

After merging the rdma tree, today's linux-next build (htmldocs) produced
this warning:

drivers/infiniband/core/verbs.c:1206: warning: Function parameter or member 'caller' not described in 'ib_create_named_qp'

Introduced by commit

  66f57b871efc ("RDMA/restrack: Support all QP types")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the rdma tree
  2020-12-03  7:42 linux-next: build warning after merge of the rdma tree Stephen Rothwell
@ 2020-12-03  9:39 ` Leon Romanovsky
  0 siblings, 0 replies; 20+ messages in thread
From: Leon Romanovsky @ 2020-12-03  9:39 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Doug Ledford, Jason Gunthorpe, Jason Gunthorpe, Jason Gunthorpe,
	Linux Kernel Mailing List, Linux Next Mailing List

On Thu, Dec 03, 2020 at 06:42:19PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the rdma tree, today's linux-next build (htmldocs) produced
> this warning:
>
> drivers/infiniband/core/verbs.c:1206: warning: Function parameter or member 'caller' not described in 'ib_create_named_qp'
>
> Introduced by commit
>
>   66f57b871efc ("RDMA/restrack: Support all QP types")

Thanks Stephen,

We really don't need to see anyone using this ib_create_named_qp()
function call directly.

>
> --
> Cheers,
> Stephen Rothwell



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

* Re: linux-next: build warning after merge of the rdma tree
  2021-02-10 13:47 ` Jason Gunthorpe
  2021-02-10 17:17   ` Nathan Chancellor
@ 2021-02-10 22:08   ` Lee Jones
  1 sibling, 0 replies; 20+ messages in thread
From: Lee Jones @ 2021-02-10 22:08 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Stephen Rothwell, Doug Ledford, Leon Romanovsky, Parav Pandit,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, 10 Feb 2021, Jason Gunthorpe wrote:

> On Wed, Feb 10, 2021 at 09:11:49PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the rdma tree, today's linux-next build (htmldocs) produced
> > this warning:
> > 
> > drivers/infiniband/core/device.c:859: warning: Function parameter or member 'dev' not described in 'ib_port_immutable_read'
> > drivers/infiniband/core/device.c:859: warning: Function parameter or member 'port' not described in 'ib_port_immutable_read'
> > 
> > Introduced by commit
> > 
> >   7416790e2245 ("RDMA/core: Introduce and use API to read port immutable data")
> 
> drivers/infinband is W=1 clean right now in linux-next
> 
> But how can I build *only* drivers/infiniband using W=1 so I can keep
> it that way?
> 
> The rest of the kernel is not clean and creates too much warning noise
> to be usable, even with my mini config.
> 
> Just doing a 'make W=1 drivers/infiniband' is sort of OK, but then I
> end up compiling things twice
> 
> Does anyone know a good solution?

I have 2 solutions that I use;

When building locally, I have a special flag for testing branches I
maintain.  The flag indicates that the output should be passed through
a parsing script which highlights entries I care about.  The script
handles lots of other options such as building for different
architectures, running smatch and sparse, etc, but the bit you might
care about goes something like this:

 eval $make $makeoptions $extraoptions $flagoptions $diroptions 2>&1 | (\
 while read line; do
     if echo $line | grep -i "${DIRSGREP}" > /dev/null; then
         print_red "$line" >&2;
     else
         echo $line;
     fi
 done) | tail

This hides almost all output that I don't care about and highlights
the information that is of interest to me in red.

Another solution is to use a builder (I personally use Tuxsuite) to
run 70 different builds (architectures/configs) on *both* a common
base (latest -next, kernel release, stable release, etc) and the head
of the branch I care about and compare the two.  Tuxsuite is nice
since it returns a JSON file with all of the results, so comparison
becomes trivial.

Output of a failed build might look like this:

 $ build-test stable v4.9.257                    # where v4.9.257 is the common base
 Using Tuxbuild to compare build failures/warnings
  
 Tuxbuild the base [v4.9.257] 
 Total 0 (delta 0), reused 0 (delta 0)
 To [remote_repo]/linux.git
  * [new tag]                   tuxbuild-to-test-1414 -> tuxbuild-to-test-1414
 Tuxbuild the current branch [tb-some-topic-branch]
 Total 0 (delta 0), reused 0 (delta 0)
 To [remote_repo]/linux.git
  * [new tag]                   tuxbuild-to-test-1415 -> tuxbuild-to-test-1415
 Waiting for child processes to finish 
 Evaluating the results 
 
 Errors were caused
  
 [v4.9.257] tb-some-topic-branch c18034406e3b ("subsystem: Descriptive commit message")

  arc axs101_defconfig gcc-9
      https://builds.tuxbuild.com/1oIa24eac9ANKJLLMBDgP6zwE5d/ 	 Pass (0 errors - 0 warnings) : v4.9.257
      https://builds.tuxbuild.com/1oIa4WZ1jw4tJtt3mLqTNiX4C1a/ 	 Fail (6 errors - 3 warnings) : tb-some-topic-branch 

  arm allmodconfig gcc-8
      https://builds.tuxbuild.com/1oIa21QYn23XxgnDKUh9as5Pgvc/ 	 Pass (0 errors - 0 warnings) : v4.9.257
      https://builds.tuxbuild.com/1oIa4YT8nEIjaFOaFLuRVId2D7I/ 	 Fail (0 errors - 9 warnings) : tb-some-topic-branch 

  arm64 defconfig gcc-9
      https://builds.tuxbuild.com/1oIa2AR63BljDuvKHKet8Qqga7L/ 	 Pass (1 errors - 3 warnings) : v4.9.257
      https://builds.tuxbuild.com/1oIa4biSryBYrj4JoZlRGpgx8AF/ 	 Fail (2 errors - 8 warnings) : tb-some-topic-branch 

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: linux-next: build warning after merge of the rdma tree
  2021-02-10 13:47 ` Jason Gunthorpe
@ 2021-02-10 17:17   ` Nathan Chancellor
  2021-02-10 22:08   ` Lee Jones
  1 sibling, 0 replies; 20+ messages in thread
From: Nathan Chancellor @ 2021-02-10 17:17 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Stephen Rothwell, Lee Jones, Doug Ledford, Leon Romanovsky,
	Parav Pandit, Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Feb 10, 2021 at 09:47:42AM -0400, Jason Gunthorpe wrote:
> On Wed, Feb 10, 2021 at 09:11:49PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the rdma tree, today's linux-next build (htmldocs) produced
> > this warning:
> > 
> > drivers/infiniband/core/device.c:859: warning: Function parameter or member 'dev' not described in 'ib_port_immutable_read'
> > drivers/infiniband/core/device.c:859: warning: Function parameter or member 'port' not described in 'ib_port_immutable_read'
> > 
> > Introduced by commit
> > 
> >   7416790e2245 ("RDMA/core: Introduce and use API to read port immutable data")
> 
> drivers/infinband is W=1 clean right now in linux-next
> 
> But how can I build *only* drivers/infiniband using W=1 so I can keep
> it that way?
> 
> The rest of the kernel is not clean and creates too much warning noise
> to be usable, even with my mini config.
> 
> Just doing a 'make W=1 drivers/infiniband' is sort of OK, but then I
> end up compiling things twice
> 
> Does anyone know a good solution?
> 
> Jason
> 

Hi Jason,

There was at one point an effort from Andrew Lunn to allow subsystems to
opt in W=1 unconditionally but Masahiro had some concerns with both
approaches:

https://lore.kernel.org/r/20200919190258.3673246-1-andrew@lunn.ch/
https://lore.kernel.org/r/20201001011232.4050282-1-andrew@lunn.ch/

It looks like btrfs has just opted to copy the W=1 flags into its
Makefile:

https://git.kernel.org/next/linux-next/c/3a7b58d632b24ec3321f1ee3027bd407e09e515e

Cheers,
Nathan

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

* Re: linux-next: build warning after merge of the rdma tree
  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
  0 siblings, 2 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2021-02-10 13:47 UTC (permalink / raw)
  To: Stephen Rothwell, Lee Jones
  Cc: Doug Ledford, Leon Romanovsky, Parav Pandit,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Feb 10, 2021 at 09:11:49PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the rdma tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> drivers/infiniband/core/device.c:859: warning: Function parameter or member 'dev' not described in 'ib_port_immutable_read'
> drivers/infiniband/core/device.c:859: warning: Function parameter or member 'port' not described in 'ib_port_immutable_read'
> 
> Introduced by commit
> 
>   7416790e2245 ("RDMA/core: Introduce and use API to read port immutable data")

drivers/infinband is W=1 clean right now in linux-next

But how can I build *only* drivers/infiniband using W=1 so I can keep
it that way?

The rest of the kernel is not clean and creates too much warning noise
to be usable, even with my mini config.

Just doing a 'make W=1 drivers/infiniband' is sort of OK, but then I
end up compiling things twice

Does anyone know a good solution?

Jason





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

* linux-next: build warning after merge of the rdma tree
@ 2021-02-10 10:11 Stephen Rothwell
  2021-02-10 13:47 ` Jason Gunthorpe
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2021-02-10 10:11 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Jason Gunthorpe, Jason Gunthorpe, Leon Romanovsky, Parav Pandit,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the rdma tree, today's linux-next build (htmldocs) produced
this warning:

drivers/infiniband/core/device.c:859: warning: Function parameter or member 'dev' not described in 'ib_port_immutable_read'
drivers/infiniband/core/device.c:859: warning: Function parameter or member 'port' not described in 'ib_port_immutable_read'

Introduced by commit

  7416790e2245 ("RDMA/core: Introduce and use API to read port immutable data")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* RE: linux-next: build warning after merge of the rdma tree
  2019-02-14  0:21 ` Doug Ledford
@ 2019-02-14 12:35   ` Wan, Kaike
  0 siblings, 0 replies; 20+ messages in thread
From: Wan, Kaike @ 2019-02-14 12:35 UTC (permalink / raw)
  To: Doug Ledford, Stephen Rothwell, Jason Gunthorpe
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Gustavo A. R. Silva, Kees Cook



> -----Original Message-----
> From: Doug Ledford [mailto:dledford@redhat.com]
> Sent: Wednesday, February 13, 2019 7:21 PM
> To: Stephen Rothwell <sfr@canb.auug.org.au>; Jason Gunthorpe
> <jgg@mellanox.com>
> Cc: Linux Next Mailing List <linux-next@vger.kernel.org>; Linux Kernel
> Mailing List <linux-kernel@vger.kernel.org>; Wan, Kaike
> <kaike.wan@intel.com>; Gustavo A. R. Silva <gustavo@embeddedor.com>;
> Kees Cook <keescook@chromium.org>
> Subject: Re: linux-next: build warning after merge of the rdma tree
> 
> On Thu, 2019-02-14 at 11:18 +1100, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the rdma tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> >
> > drivers/infiniband/hw/hfi1/qp.c: In function 'hfi1_setup_wqe':
> > drivers/infiniband/hw/hfi1/qp.c:328:3: warning: this statement may fall
> through [-Wimplicit-fallthrough=]
> >    hfi1_setup_tid_rdma_wqe(qp, wqe);
> >    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/infiniband/hw/hfi1/qp.c:329:2: note: here
> >   case IB_QPT_UC:
> >   ^~~~
> >
> > Introduced by commit
> >
> >   f1ab4efa6d32 ("IB/hfi1: Enable TID RDMA READ protocol")
> >
> > I get this warning because I am building with -Wimplicit-fallthrough
> > in attempt to catch new additions early.  The gcc warning can be
> > turned off by adding a /* fall through */ comment at the point the
> > fall through happens (assuming that the fall through is intentional).
> >
> 
> Thanks Stephen, we'll sort it and make an appropriate fixup patch.
> 
> Kaike?

It's intentional. We will add a "/* fall through */" comment as a fixup patch.

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

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

* linux-next: build warning after merge of the rdma tree
@ 2019-02-14  0:23 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2019-02-14  0:23 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Kaike Wan,
	Gustavo A. R. Silva, Kees Cook

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

Hi all,

After merging the rdma tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/infiniband/hw/hfi1/tid_rdma.c: In function 'hfi1_tid_rdma_wqe_interlock':
drivers/infiniband/hw/hfi1/tid_rdma.c:3251:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   switch (prev->wr.opcode) {
   ^~~~~~
drivers/infiniband/hw/hfi1/tid_rdma.c:3259:2: note: here
  case IB_WR_RDMA_READ:
  ^~~~

Introduced by commit

  c6c231175ccd ("IB/hfi1: Add interlock between TID RDMA WRITE and other requests")

I get this warning because I am building with -Wimplicit-fallthrough
in attempt to catch new additions early.  The gcc warning can be turned
off by adding a /* fall through */ comment at the point the fall through
happens (assuming that the fall through is intentional).

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the rdma tree
  2019-02-14  0:18 Stephen Rothwell
@ 2019-02-14  0:21 ` Doug Ledford
  2019-02-14 12:35   ` Wan, Kaike
  0 siblings, 1 reply; 20+ messages in thread
From: Doug Ledford @ 2019-02-14  0:21 UTC (permalink / raw)
  To: Stephen Rothwell, Jason Gunthorpe
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Kaike Wan,
	Gustavo A. R. Silva, Kees Cook

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

On Thu, 2019-02-14 at 11:18 +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the rdma tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/infiniband/hw/hfi1/qp.c: In function 'hfi1_setup_wqe':
> drivers/infiniband/hw/hfi1/qp.c:328:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    hfi1_setup_tid_rdma_wqe(qp, wqe);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/infiniband/hw/hfi1/qp.c:329:2: note: here
>   case IB_QPT_UC:
>   ^~~~
> 
> Introduced by commit
> 
>   f1ab4efa6d32 ("IB/hfi1: Enable TID RDMA READ protocol")
> 
> I get this warning because I am building with -Wimplicit-fallthrough
> in attempt to catch new additions early.  The gcc warning can be turned
> off by adding a /* fall through */ comment at the point the fall through
> happens (assuming that the fall through is intentional).
> 

Thanks Stephen, we'll sort it and make an appropriate fixup patch.

Kaike?

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Key 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 --]

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

* linux-next: build warning after merge of the rdma tree
@ 2019-02-14  0:18 Stephen Rothwell
  2019-02-14  0:21 ` Doug Ledford
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2019-02-14  0:18 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Kaike Wan,
	Gustavo A. R. Silva, Kees Cook

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

Hi all,

After merging the rdma tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/infiniband/hw/hfi1/qp.c: In function 'hfi1_setup_wqe':
drivers/infiniband/hw/hfi1/qp.c:328:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   hfi1_setup_tid_rdma_wqe(qp, wqe);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/hfi1/qp.c:329:2: note: here
  case IB_QPT_UC:
  ^~~~

Introduced by commit

  f1ab4efa6d32 ("IB/hfi1: Enable TID RDMA READ protocol")

I get this warning because I am building with -Wimplicit-fallthrough
in attempt to catch new additions early.  The gcc warning can be turned
off by adding a /* fall through */ comment at the point the fall through
happens (assuming that the fall through is intentional).

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the rdma tree
  2018-07-26  5:10   ` Bart Van Assche
@ 2018-07-26 17:38     ` Jason Gunthorpe
  0 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2018-07-26 17:38 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: sfr, linux-kernel, linux-next, dledford, chuck.lever

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)

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

* Re: linux-next: build warning after merge of the rdma tree
  2018-07-26  3:05 ` Jason Gunthorpe
@ 2018-07-26  5:10   ` Bart Van Assche
  2018-07-26 17:38     ` Jason Gunthorpe
  0 siblings, 1 reply; 20+ messages in thread
From: Bart Van Assche @ 2018-07-26  5:10 UTC (permalink / raw)
  To: jgg, sfr; +Cc: linux-kernel, linux-next, dledford, chuck.lever

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?

Thanks,

Bart.


diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c
index 80975427f523..ce3ea8419704 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)

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

* Re: linux-next: build warning after merge of the rdma tree
  2018-07-26  0:55 Stephen Rothwell
@ 2018-07-26  3:05 ` Jason Gunthorpe
  2018-07-26  5:10   ` Bart Van Assche
  0 siblings, 1 reply; 20+ messages in thread
From: Jason Gunthorpe @ 2018-07-26  3:05 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Doug Ledford, Linux-Next Mailing List, Linux Kernel Mailing List,
	Bart Van Assche, Chuck Lever

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,
Jason

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

* linux-next: build warning after merge of the rdma tree
@ 2018-07-26  0:55 Stephen Rothwell
  2018-07-26  3:05 ` Jason Gunthorpe
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2018-07-26  0:55 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Bart Van Assche, Chuck Lever

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

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

Introduced by commit

  ed288d74a9e5 ("net/xprtrdma: Simplify ib_post_(send|recv|srq_recv)() calls")

This is an actual problem.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the rdma tree
@ 2018-07-10  1:28 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2018-07-10  1:28 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Bart Van Assche

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

Hi all,

After merging the rdma tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

In file included from include/linux/kernel.h:14:0,
                 from include/asm-generic/bug.h:18,
                 from arch/powerpc/include/asm/bug.h:128,
                 from include/linux/bug.h:5,
                 from arch/powerpc/include/asm/mmu.h:126,
                 from arch/powerpc/include/asm/lppaca.h:36,
                 from arch/powerpc/include/asm/paca.h:21,
                 from arch/powerpc/include/asm/current.h:16,
                 from include/linux/mutex.h:14,
                 from drivers/infiniband/hw/cxgb4/iw_cxgb4.h:34,
                 from drivers/infiniband/hw/cxgb4/cq.c:33:
drivers/infiniband/hw/cxgb4/cq.c: In function '__c4iw_poll_cq_one':
include/linux/printk.h:308:2: warning: 'cqe.header' may be used uninitialized in this function [-Wmaybe-uninitialized]
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
  ^~~~~~
drivers/infiniband/hw/cxgb4/cq.c:674:16: note: 'cqe.header' was declared here
  struct t4_cqe cqe;
                ^~~

Introduced by commit

  4ab39e2f98f2 ("RDMA/cxgb4: Make c4iw_poll_cq_one() easier to analyze")

I can't tell easily if this is a false positive or not.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the rdma tree
  2018-05-14 18:09   ` Steve Wise
@ 2018-05-14 20:29     ` Steve Wise
  0 siblings, 0 replies; 20+ messages in thread
From: Steve Wise @ 2018-05-14 20:29 UTC (permalink / raw)
  To: Jason Gunthorpe, Stephen Rothwell
  Cc: Doug Ledford, Linux-Next Mailing List, Linux Kernel Mailing List



On 5/14/2018 1:09 PM, Steve Wise wrote:
>
> On 5/14/2018 1:03 PM, Jason Gunthorpe wrote:
>> On Mon, May 07, 2018 at 09:44:54AM +1000, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> After merging the rdma tree, today's linux-next build (x86_64
>>> allmodconfig) produced this warning:
>>>
>>> drivers/infiniband/hw/cxgb4/restrack.c: In function 'fill_res_qp_entry':
>>> drivers/infiniband/hw/cxgb4/restrack.c:140:6: warning: 'last_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>   if (rdma_nl_put_driver_u32(msg, "idx", idx))
>>>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> drivers/infiniband/hw/cxgb4/restrack.c:180:20: note: 'last_rq_idx' was declared here
>>>   u16 first_rq_idx, last_rq_idx;
>>>                     ^~~~~~~~~~~
>>> drivers/infiniband/hw/cxgb4/restrack.c:140:6: warning: 'first_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>   if (rdma_nl_put_driver_u32(msg, "idx", idx))
>>>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> drivers/infiniband/hw/cxgb4/restrack.c:180:6: note: 'first_rq_idx' was declared here
>>>   u16 first_rq_idx, last_rq_idx;
>>>       ^~~~~~~~~~~~
>>> drivers/infiniband/hw/cxgb4/restrack.c:228:6: warning: 'last_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>   if (fill_swsqes(msg, &wq.sq, first_sq_idx, fsp, last_sq_idx, lsp))
>>>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> drivers/infiniband/hw/cxgb4/restrack.c:228:6: warning: 'first_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>
>>> Introduced by commit
>>>
>>>   056f9c7f39bf ("iw_cxgb4: dump detailed driver-specific QP information")
>>>
>> SteveW, is there a patch to fix this that I'm missing?
>>
>> Thanks,
>> Jason
> Hey Jason, 
>
> I'll send you one shortly. 
>
> Steve.
>

Posted:  https://patchwork.kernel.org/patch/10399081/

Steve.

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

* Re: linux-next: build warning after merge of the rdma tree
  2018-05-14 18:03 ` Jason Gunthorpe
@ 2018-05-14 18:09   ` Steve Wise
  2018-05-14 20:29     ` Steve Wise
  0 siblings, 1 reply; 20+ messages in thread
From: Steve Wise @ 2018-05-14 18:09 UTC (permalink / raw)
  To: Jason Gunthorpe, Stephen Rothwell
  Cc: Doug Ledford, Linux-Next Mailing List, Linux Kernel Mailing List



On 5/14/2018 1:03 PM, Jason Gunthorpe wrote:
> On Mon, May 07, 2018 at 09:44:54AM +1000, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the rdma tree, today's linux-next build (x86_64
>> allmodconfig) produced this warning:
>>
>> drivers/infiniband/hw/cxgb4/restrack.c: In function 'fill_res_qp_entry':
>> drivers/infiniband/hw/cxgb4/restrack.c:140:6: warning: 'last_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   if (rdma_nl_put_driver_u32(msg, "idx", idx))
>>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/infiniband/hw/cxgb4/restrack.c:180:20: note: 'last_rq_idx' was declared here
>>   u16 first_rq_idx, last_rq_idx;
>>                     ^~~~~~~~~~~
>> drivers/infiniband/hw/cxgb4/restrack.c:140:6: warning: 'first_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   if (rdma_nl_put_driver_u32(msg, "idx", idx))
>>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/infiniband/hw/cxgb4/restrack.c:180:6: note: 'first_rq_idx' was declared here
>>   u16 first_rq_idx, last_rq_idx;
>>       ^~~~~~~~~~~~
>> drivers/infiniband/hw/cxgb4/restrack.c:228:6: warning: 'last_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>   if (fill_swsqes(msg, &wq.sq, first_sq_idx, fsp, last_sq_idx, lsp))
>>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/infiniband/hw/cxgb4/restrack.c:228:6: warning: 'first_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>
>> Introduced by commit
>>
>>   056f9c7f39bf ("iw_cxgb4: dump detailed driver-specific QP information")
>>
> SteveW, is there a patch to fix this that I'm missing?
>
> Thanks,
> Jason

Hey Jason, 

I'll send you one shortly. 

Steve.

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

* Re: linux-next: build warning after merge of the rdma tree
  2018-05-06 23:44 Stephen Rothwell
@ 2018-05-14 18:03 ` Jason Gunthorpe
  2018-05-14 18:09   ` Steve Wise
  0 siblings, 1 reply; 20+ messages in thread
From: Jason Gunthorpe @ 2018-05-14 18:03 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Doug Ledford, Linux-Next Mailing List, Linux Kernel Mailing List,
	Steve Wise

On Mon, May 07, 2018 at 09:44:54AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the rdma tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/infiniband/hw/cxgb4/restrack.c: In function 'fill_res_qp_entry':
> drivers/infiniband/hw/cxgb4/restrack.c:140:6: warning: 'last_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   if (rdma_nl_put_driver_u32(msg, "idx", idx))
>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/infiniband/hw/cxgb4/restrack.c:180:20: note: 'last_rq_idx' was declared here
>   u16 first_rq_idx, last_rq_idx;
>                     ^~~~~~~~~~~
> drivers/infiniband/hw/cxgb4/restrack.c:140:6: warning: 'first_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   if (rdma_nl_put_driver_u32(msg, "idx", idx))
>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/infiniband/hw/cxgb4/restrack.c:180:6: note: 'first_rq_idx' was declared here
>   u16 first_rq_idx, last_rq_idx;
>       ^~~~~~~~~~~~
> drivers/infiniband/hw/cxgb4/restrack.c:228:6: warning: 'last_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   if (fill_swsqes(msg, &wq.sq, first_sq_idx, fsp, last_sq_idx, lsp))
>       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/infiniband/hw/cxgb4/restrack.c:228:6: warning: 'first_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
> 
> Introduced by commit
> 
>   056f9c7f39bf ("iw_cxgb4: dump detailed driver-specific QP information")
> 

SteveW, is there a patch to fix this that I'm missing?

Thanks,
Jason

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

* linux-next: build warning after merge of the rdma tree
@ 2018-05-06 23:44 Stephen Rothwell
  2018-05-14 18:03 ` Jason Gunthorpe
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2018-05-06 23:44 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Steve Wise

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

Hi all,

After merging the rdma tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/infiniband/hw/cxgb4/restrack.c: In function 'fill_res_qp_entry':
drivers/infiniband/hw/cxgb4/restrack.c:140:6: warning: 'last_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (rdma_nl_put_driver_u32(msg, "idx", idx))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:180:20: note: 'last_rq_idx' was declared here
  u16 first_rq_idx, last_rq_idx;
                    ^~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:140:6: warning: 'first_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (rdma_nl_put_driver_u32(msg, "idx", idx))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:180:6: note: 'first_rq_idx' was declared here
  u16 first_rq_idx, last_rq_idx;
      ^~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:228:6: warning: 'last_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (fill_swsqes(msg, &wq.sq, first_sq_idx, fsp, last_sq_idx, lsp))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:228:6: warning: 'first_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]

Introduced by commit

  056f9c7f39bf ("iw_cxgb4: dump detailed driver-specific QP information")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build warning after merge of the rdma tree
@ 2018-05-06 23:40 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2018-05-06 23:40 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Steve Wise

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

Hi all,

After merging the rdma tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

drivers/infiniband/hw/cxgb4/restrack.c: In function 'fill_res_qp_entry':
drivers/infiniband/hw/cxgb4/restrack.c:162:6: warning: 'last_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (fill_swrqe(msg, rq, last_idx, last_rqe))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:180:20: note: 'last_rq_idx' was declared here
  u16 first_rq_idx, last_rq_idx;
                    ^~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:158:6: warning: 'first_rq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (fill_swrqe(msg, rq, first_idx, first_rqe))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:180:6: note: 'first_rq_idx' was declared here
  u16 first_rq_idx, last_rq_idx;
      ^~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:129:6: warning: 'last_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (fill_swsqe(msg, sq, last_idx, last_sqe))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:179:20: note: 'last_sq_idx' was declared here
  u16 first_sq_idx, last_sq_idx;
                    ^~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:125:6: warning: 'first_sq_idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (fill_swsqe(msg, sq, first_idx, first_sqe))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/cxgb4/restrack.c:179:6: note: 'first_sq_idx' was declared here
  u16 first_sq_idx, last_sq_idx;
      ^~~~~~~~~~~~

Introduced by commit

  056f9c7f39bf ("iw_cxgb4: dump detailed driver-specific QP information")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-02-10 22:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03  7:42 linux-next: build warning after merge of the rdma tree Stephen Rothwell
2020-12-03  9:39 ` Leon Romanovsky
  -- 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
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-26  0:55 Stephen Rothwell
2018-07-26  3:05 ` Jason Gunthorpe
2018-07-26  5:10   ` Bart Van Assche
2018-07-26 17:38     ` Jason Gunthorpe
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

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