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

drivers/infiniband/ulp/srpt/ib_srpt.c: fix build with gcc-4.4.4

commit 06892cc1 upstream.

gcc-4.4.4 has issues with initialization of anonymous unions:

drivers/infiniband/ulp/srpt/ib_srpt.c: In function 'srpt_zerolength_write':
drivers/infiniband/ulp/srpt/ib_srpt.c:854: error: unknown field 'wr_cqe' specified in initializer
drivers/infiniband/ulp/srpt/ib_srpt.c:854: warning: initialization makes integer from pointer without a cast

Work aound this.

Fixes: 2a78cb4d ("IB/srpt: Fix an out-of-bounds stack access in srpt_zerolength_write()")
Cc: Bart Van Assche <>
Cc: Christoph Hellwig <>
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 1e8bb2e9
......@@ -790,8 +790,9 @@ static int srpt_zerolength_write(struct srpt_rdma_ch *ch)
struct ib_send_wr *bad_wr;
struct ib_rdma_wr wr = {
.wr = {
.next = NULL,
{ .wr_cqe = &ch->zw_cqe, },
.opcode = IB_WR_RDMA_WRITE,
.wr_cqe = &ch->zw_cqe,
.send_flags = IB_SEND_SIGNALED,
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