From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve1eur01on0074.outbound.protection.outlook.com ([104.47.1.74]:64032 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932197AbeCMWBm (ORCPT ); Tue, 13 Mar 2018 18:01:42 -0400 Date: Tue, 13 Mar 2018 16:01:23 -0600 From: Jason Gunthorpe To: akpm@linux-foundation.org Cc: bart.vanassche@wdc.com, mm-commits@vger.kernel.org, sagi@grimberg.me, stable@vger.kernel.org, swise@opengridcomputing.com Subject: Re: + drivers-infiniband-core-verbsc-fix-build-with-gcc-444.patch added to -mm tree Message-ID: <20180313220123.GD21512@mellanox.com> References: <20180313215121.lzXDQU5i7%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180313215121.lzXDQU5i7%akpm@linux-foundation.org> Sender: stable-owner@vger.kernel.org List-ID: On Tue, Mar 13, 2018 at 02:51:21PM -0700, akpm@linux-foundation.org wrote: > > The patch titled > Subject: drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4 > has been added to the -mm tree. Its filename is > drivers-infiniband-core-verbsc-fix-build-with-gcc-444.patch > > This patch should soon appear at > http://ozlabs.org/~akpm/mmots/broken-out/drivers-infiniband-core-verbsc-fix-build-with-gcc-444.patch > and later at > http://ozlabs.org/~akpm/mmotm/broken-out/drivers-infiniband-core-verbsc-fix-build-with-gcc-444.patch > > Before you just go and hit "reply", please: > a) Consider who else should be cc'ed > b) Prefer to cc a suitable mailing list as well > c) Ideally: find the original patch on the mailing list and do a > reply-to-all to that, adding suitable additional cc's > > *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** > > The -mm tree is included into linux-next and is updated > there every 3-4 working days > > From: Andrew Morton > 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 > Cc: Steve Wise > Cc: Sagi Grimberg > Cc: Jason Gunthorpe > Cc: > Signed-off-by: Andrew Morton > > 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 > @@ -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; > _ > There were two patches in the series that introduced this, and the same construct was also added in 2a78cb4db487 ("IB/srpt: Fix an out-of-bounds stack access in srpt_zerolength_write()") We should probably fix both?? Should this go through the rdma -rc tree? Thanks, Jason