Commit d02c9c8b authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

drivers/infiniband/core/verbs.c: fix build with gcc-4.4.4

commit 6ee68773 upstream.

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: a1ae7d03 ("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: default avatarAndrew Morton <>
Signed-off-by: default avatarDoug Ledford <>
Signed-off-by: default avatarSudip Mukherjee <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 3af61871
......@@ -2118,8 +2118,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;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment