Skip to content

Commit 2c88444

Browse files
Sindhu-Devalerleon
authored andcommitted
RDMA/irdma: Use s/g array in post send only when its valid
Send with invalidate verb call can pass in an uninitialized s/g array with 0 sge's which is filled into irdma WQE and causes a HW asynchronous event. Fix this by using the s/g array in irdma post send only when its valid. Fixes: 551c46e ("RDMA/irdma: Add user/kernel shared libraries") Signed-off-by: Sindhu-Devale <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent dcb23bb commit 2c88444

File tree

1 file changed

+2
-1
lines changed
  • drivers/infiniband/hw/irdma

1 file changed

+2
-1
lines changed

drivers/infiniband/hw/irdma/uk.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@ int irdma_uk_send(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
497497
FIELD_PREP(IRDMAQPSQ_IMMDATA, info->imm_data));
498498
i = 0;
499499
} else {
500-
qp->wqe_ops.iw_set_fragment(wqe, 0, op_info->sg_list,
500+
qp->wqe_ops.iw_set_fragment(wqe, 0,
501+
frag_cnt ? op_info->sg_list : NULL,
501502
qp->swqe_polarity);
502503
i = 1;
503504
}

0 commit comments

Comments
 (0)