All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shiraz Saleem <shiraz.saleem@intel.com>
To: jgg@nvidia.com, leon@kernel.org
Cc: linux-rdma@vger.kernel.org,
	Sindhu-Devale <sindhu.devale@intel.com>,
	Shiraz Saleem <shiraz.saleem@intel.com>
Subject: [PATCH for-rc 4/5] RDMA/irdma: Use s/g array in post send only when its valid
Date: Tue,  6 Sep 2022 17:32:43 -0500	[thread overview]
Message-ID: <20220906223244.1119-5-shiraz.saleem@intel.com> (raw)
In-Reply-To: <20220906223244.1119-1-shiraz.saleem@intel.com>

From: Sindhu-Devale <sindhu.devale@intel.com>

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 <sindhu.devale@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
---
 drivers/infiniband/hw/irdma/uk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c
index d003ad8..a6e5d35 100644
--- a/drivers/infiniband/hw/irdma/uk.c
+++ b/drivers/infiniband/hw/irdma/uk.c
@@ -497,7 +497,8 @@ int irdma_uk_send(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
 			      FIELD_PREP(IRDMAQPSQ_IMMDATA, info->imm_data));
 		i = 0;
 	} else {
-		qp->wqe_ops.iw_set_fragment(wqe, 0, op_info->sg_list,
+		qp->wqe_ops.iw_set_fragment(wqe, 0,
+					    frag_cnt ? op_info->sg_list : NULL,
 					    qp->swqe_polarity);
 		i = 1;
 	}
-- 
1.8.3.1


  parent reply	other threads:[~2022-09-06 22:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 22:32 [PATCH for-rc 0/5] irdma for-rc updates 9-6-2022 Shiraz Saleem
2022-09-06 22:32 ` [PATCH for-rc 1/5] RDMA/irdma: Report the correct max cqes from query device Shiraz Saleem
2022-09-06 22:32 ` [PATCH for-rc 2/5] RDMA/irdma: Return error on MR deregister CQP failure Shiraz Saleem
2022-09-06 22:32 ` [PATCH for-rc 3/5] RDMA/irdma: Return correct WC error for bind operation failure Shiraz Saleem
2022-09-06 22:32 ` Shiraz Saleem [this message]
2022-09-06 22:32 ` [PATCH for-rc 5/5] RDMA/irdma: Report RNR NAK generation in device caps Shiraz Saleem
2022-09-07  8:29 ` [PATCH for-rc 0/5] irdma for-rc updates 9-6-2022 Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220906223244.1119-5-shiraz.saleem@intel.com \
    --to=shiraz.saleem@intel.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sindhu.devale@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.