stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: akpm@linux-foundation.org, bart.vanassche@wdc.com,
	jgg@mellanox.com, linux-rdma@vger.kernel.org, sagi@grimberg.me,
	stable@vger.kernel.org, swise@opengridcomputing.com
Subject: Re: [patch 1/1] drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4
Date: Wed, 14 Mar 2018 16:41:00 -0400	[thread overview]
Message-ID: <1521060060.18703.111.camel@redhat.com> (raw)
In-Reply-To: <20180313215157.GL3mSm-p6%akpm@linux-foundation.org>

[-- 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 --]

  reply	other threads:[~2018-03-14 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2018-03-14 21:08   ` Andrew Morton
2018-03-14 21:12     ` Doug Ledford
2018-03-14 22:15       ` Doug Ledford

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=1521060060.18703.111.camel@redhat.com \
    --to=dledford@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bart.vanassche@wdc.com \
    --cc=jgg@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sagi@grimberg.me \
    --cc=stable@vger.kernel.org \
    --cc=swise@opengridcomputing.com \
    /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).