* [patch 1/1] drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
@ 2018-03-13 21:51 akpm
2018-03-14 20:41 ` Doug Ledford
0 siblings, 1 reply; 5+ messages in thread
From: akpm @ 2018-03-13 21:51 UTC (permalink / raw)
To: akpm, bart.vanassche, jgg, linux-rdma, sagi, stable, swise
From: Andrew Morton <akpm@linux-foundation.org>
Subject: drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
gcc-4.4.4 has issues with initialization of anonymous unions.
drivers/infiniband/core/verbs.c: In function '__ib_drain_sq':
drivers/infiniband/core/verbs.c:2204: error: unknown field 'wr_cqe' specified in initializer
drivers/infiniband/core/verbs.c:2204: warning: initialization makes integer from pointer without a cast
Work around this.
Fixes: a1ae7d0345edd5 ("RDMA/core: Avoid that ib_drain_qp() triggers an out-of-bounds stack access")
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Jason Gunthorpe <jgg@mellanox.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/infiniband/core/verbs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN drivers/infiniband/core/verbs.c~drivers-infiniband-core-verbsc-fix-build-with-gcc-444 drivers/infiniband/core/verbs.c
--- a/drivers/infiniband/core/verbs.c~drivers-infiniband-core-verbsc-fix-build-with-gcc-444
+++ a/drivers/infiniband/core/verbs.c
@@ -2200,8 +2200,9 @@ static void __ib_drain_sq(struct ib_qp *
struct ib_send_wr *bad_swr;
struct ib_rdma_wr swr = {
.wr = {
+ .next = NULL,
+ { .wr_cqe = &sdrain.cqe, },
.opcode = IB_WR_RDMA_WRITE,
- .wr_cqe = &sdrain.cqe,
},
};
int ret;
_
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/1] drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
2018-03-13 21:51 [patch 1/1] drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4 akpm
@ 2018-03-14 20:41 ` Doug Ledford
2018-03-14 21:08 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Doug Ledford @ 2018-03-14 20:41 UTC (permalink / raw)
To: akpm, bart.vanassche, jgg, linux-rdma, sagi, stable, swise
[-- Attachment #1: Type: text/plain, Size: 2094 bytes --]
On Tue, 2018-03-13 at 14:51 -0700, akpm@linux-foundation.org wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
>
> gcc-4.4.4 has issues with initialization of anonymous unions.
That compiler was released in April of 2010, almost a full 8 years ago.
What still uses it, and do we seriously care?
>
> drivers/infiniband/core/verbs.c: In function '__ib_drain_sq':
> drivers/infiniband/core/verbs.c:2204: error: unknown field 'wr_cqe' specified in initializer
> drivers/infiniband/core/verbs.c:2204: warning: initialization makes integer from pointer without a cast
>
> Work around this.
>
> Fixes: a1ae7d0345edd5 ("RDMA/core: Avoid that ib_drain_qp() triggers an out-of-bounds stack access")
> Cc: Bart Van Assche <bart.vanassche@wdc.com>
> Cc: Steve Wise <swise@opengridcomputing.com>
> Cc: Sagi Grimberg <sagi@grimberg.me>
> Cc: Jason Gunthorpe <jgg@mellanox.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/infiniband/core/verbs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff -puN drivers/infiniband/core/verbs.c~drivers-infiniband-core-verbsc-fix-build-with-gcc-444 drivers/infiniband/core/verbs.c
> --- a/drivers/infiniband/core/verbs.c~drivers-infiniband-core-verbsc-fix-build-with-gcc-444
> +++ a/drivers/infiniband/core/verbs.c
> @@ -2200,8 +2200,9 @@ static void __ib_drain_sq(struct ib_qp *
> struct ib_send_wr *bad_swr;
> struct ib_rdma_wr swr = {
> .wr = {
> + .next = NULL,
> + { .wr_cqe = &sdrain.cqe, },
> .opcode = IB_WR_RDMA_WRITE,
> - .wr_cqe = &sdrain.cqe,
> },
> };
> int ret;
> _
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
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] 5+ messages in thread
* Re: [patch 1/1] drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
2018-03-14 20:41 ` Doug Ledford
@ 2018-03-14 21:08 ` Andrew Morton
2018-03-14 21:12 ` Doug Ledford
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2018-03-14 21:08 UTC (permalink / raw)
To: Doug Ledford; +Cc: bart.vanassche, jgg, linux-rdma, sagi, stable, swise
On Wed, 14 Mar 2018 16:41:00 -0400 Doug Ledford <dledford@redhat.com> wrote:
> On Tue, 2018-03-13 at 14:51 -0700, akpm@linux-foundation.org wrote:
> > From: Andrew Morton <akpm@linux-foundation.org>
> > Subject: drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
> >
> > gcc-4.4.4 has issues with initialization of anonymous unions.
>
> That compiler was released in April of 2010, almost a full 8 years ago.
> What still uses it, and do we seriously care?
Documentation/Changes still says gcc-3.2. A few people are using the
older versions. There's talk going around about requiring something
more recent but nothing has happened yet.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 1/1] drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
2018-03-14 21:08 ` Andrew Morton
@ 2018-03-14 21:12 ` Doug Ledford
2018-03-14 22:15 ` Doug Ledford
0 siblings, 1 reply; 5+ messages in thread
From: Doug Ledford @ 2018-03-14 21:12 UTC (permalink / raw)
To: Andrew Morton; +Cc: bart.vanassche, jgg, linux-rdma, sagi, stable, swise
[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]
On Wed, 2018-03-14 at 14:08 -0700, Andrew Morton wrote:
> On Wed, 14 Mar 2018 16:41:00 -0400 Doug Ledford <dledford@redhat.com> wrote:
>
> > On Tue, 2018-03-13 at 14:51 -0700, akpm@linux-foundation.org wrote:
> > > From: Andrew Morton <akpm@linux-foundation.org>
> > > Subject: drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
> > >
> > > gcc-4.4.4 has issues with initialization of anonymous unions.
> >
> > That compiler was released in April of 2010, almost a full 8 years ago.
> > What still uses it, and do we seriously care?
>
> Documentation/Changes still says gcc-3.2. A few people are using the
> older versions. There's talk going around about requiring something
> more recent but nothing has happened yet.
OK, count this as a grumble about the outdated compiler requirement :-/.
The code this patches looks nice and clean, this patch uglies it up.
--
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] 5+ messages in thread
* Re: [patch 1/1] drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
2018-03-14 21:12 ` Doug Ledford
@ 2018-03-14 22:15 ` Doug Ledford
0 siblings, 0 replies; 5+ messages in thread
From: Doug Ledford @ 2018-03-14 22:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: bart.vanassche, jgg, linux-rdma, sagi, stable, swise
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
On Wed, 2018-03-14 at 17:12 -0400, Doug Ledford wrote:
> On Wed, 2018-03-14 at 14:08 -0700, Andrew Morton wrote:
> > On Wed, 14 Mar 2018 16:41:00 -0400 Doug Ledford <dledford@redhat.com> wrote:
> >
> > > On Tue, 2018-03-13 at 14:51 -0700, akpm@linux-foundation.org wrote:
> > > > From: Andrew Morton <akpm@linux-foundation.org>
> > > > Subject: drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
> > > >
> > > > gcc-4.4.4 has issues with initialization of anonymous unions.
> > >
> > > That compiler was released in April of 2010, almost a full 8 years ago.
> > > What still uses it, and do we seriously care?
> >
> > Documentation/Changes still says gcc-3.2. A few people are using the
> > older versions. There's talk going around about requiring something
> > more recent but nothing has happened yet.
>
> OK, count this as a grumble about the outdated compiler requirement :-/.
> The code this patches looks nice and clean, this patch uglies it up.
>
If it wasn't obvious BTW, this and the other patch you sent have been
applied to for-next area, begrudgingly ;-)
--
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] 5+ messages in thread
end of thread, other threads:[~2018-03-14 22:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13 21:51 [patch 1/1] drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4 akpm
2018-03-14 20:41 ` Doug Ledford
2018-03-14 21:08 ` Andrew Morton
2018-03-14 21:12 ` Doug Ledford
2018-03-14 22:15 ` Doug Ledford
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).