All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Moroni <jmoroni@google.com>
To: tatyana.e.nikolova@intel.com, jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, Jacob Moroni <jmoroni@google.com>
Subject: [PATCH rdma-next 3/5] RDMA/irdma: Use ib_respond_empty_udata where applicable
Date: Sat, 27 Jun 2026 02:56:40 +0000	[thread overview]
Message-ID: <20260627025642.4064973-4-jmoroni@google.com> (raw)
In-Reply-To: <20260627025642.4064973-1-jmoroni@google.com>

Methods that do not provide any user response should use
the ib_respond_empty_udata() helper to ensure that user
response buffers are cleared.

Signed-off-by: Jacob Moroni <jmoroni@google.com>
---
 drivers/infiniband/hw/irdma/verbs.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 19dcc475c355..d06df520d9be 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -457,7 +457,7 @@ static int irdma_dealloc_pd(struct ib_pd *ibpd, struct ib_udata *udata)
 
 	irdma_free_rsrc(iwdev->rf, iwdev->rf->allocated_pds, iwpd->sc_pd.pd_id);
 
-	return 0;
+	return ib_respond_empty_udata(udata);
 }
 
 /**
@@ -585,7 +585,7 @@ static int irdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)
 		iwdev->rf->hwqp1_rsvd = false;
 	irdma_free_qp_rsrc(iwqp);
 
-	return 0;
+	return ib_respond_empty_udata(udata);
 }
 
 /**
@@ -1984,7 +1984,7 @@ static int irdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata)
 
 	irdma_srq_wq_destroy(iwdev->rf, srq);
 	irdma_srq_free_rsrc(iwdev->rf, iwsrq);
-	return 0;
+	return ib_respond_empty_udata(udata);
 }
 
 /**
@@ -2024,7 +2024,7 @@ static int irdma_destroy_cq(struct ib_cq *ib_cq, struct ib_udata *udata)
 	spin_unlock_irqrestore(&iwceq->ce_lock, flags);
 	irdma_cq_free_rsrc(iwdev->rf, iwcq);
 
-	return 0;
+	return ib_respond_empty_udata(udata);
 }
 
 /**
@@ -2256,7 +2256,7 @@ static int irdma_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
 
 	iwsrq->sc_srq.srq_limit = info->srq_limit;
 
-	return 0;
+	return ib_respond_empty_udata(udata);
 }
 
 static int irdma_setup_umode_srq(struct irdma_device *iwdev,
@@ -3076,7 +3076,7 @@ static int irdma_alloc_mw(struct ib_mw *ibmw, struct ib_udata *udata)
 		return err_code;
 	}
 
-	return 0;
+	return ib_respond_empty_udata(udata);
 }
 
 /**
@@ -4043,7 +4043,7 @@ static int irdma_dereg_mr(struct ib_mr *ib_mr, struct ib_udata *udata)
 
 	kfree(iwmr);
 
-	return 0;
+	return ib_respond_empty_udata(udata);
 }
 
 /**
-- 
2.55.0.rc0.799.gd6f94ed593-goog


  parent reply	other threads:[~2026-06-27  2:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-27  2:56 [PATCH rdma-next 0/5] RDMA/irdma: Adopt robust udata Jacob Moroni
2026-06-27  2:56 ` [PATCH rdma-next 1/5] RDMA/irdma: Enforce empty udata input for no-input ops Jacob Moroni
2026-06-27  2:56 ` [PATCH rdma-next 2/5] RDMA/irdma: Use robust udata input copy helpers Jacob Moroni
2026-06-27  2:56 ` Jacob Moroni [this message]
2026-07-05 12:14   ` [PATCH rdma-next 3/5] RDMA/irdma: Use ib_respond_empty_udata where applicable Leon Romanovsky
2026-07-05 20:09     ` Jacob Moroni
2026-06-27  2:56 ` [PATCH rdma-next 4/5] RDMA/irdma: Use robust udata helper for QP creation Jacob Moroni
2026-06-27  2:56 ` [PATCH rdma-next 5/5] RDMA/irdma: Enable uverbs_robust_udata compliance flag Jacob Moroni

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=20260627025642.4064973-4-jmoroni@google.com \
    --to=jmoroni@google.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=tatyana.e.nikolova@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.