summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2018-03-13 14:51:57 -0700
committerDoug Ledford <dledford@redhat.com>2018-03-14 18:14:08 -0400
commit6ee687735e745eafae9e6b93d1ea70bc52e7ad07 (patch)
tree4a51380ca6642b25258475b9ec3c064d6f4ac7eb
parent43c9fc509fa59d602f9c303d02b33db015022881 (diff)
downloadblackbird-obmc-linux-6ee687735e745eafae9e6b93d1ea70bc52e7ad07.tar.gz
blackbird-obmc-linux-6ee687735e745eafae9e6b93d1ea70bc52e7ad07.zip
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> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/core/verbs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index f7de886da430..95e3b307c93a 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -2196,8 +2196,9 @@ static void __ib_drain_sq(struct ib_qp *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;
OpenPOWER on IntegriCloud