Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Jacob Moroni <jmoroni@google.com>
Cc: tatyana.e.nikolova@intel.com, leon@kernel.org,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next v2 0/5] RDMA/irdma: Adopt robust udata
Date: Tue, 30 Jun 2026 16:18:36 -0300	[thread overview]
Message-ID: <20260630191836.GM7525@ziepe.ca> (raw)
In-Reply-To: <CAHYDg1T099scmOKWXXV25OvOBNBFMA+Fm3ev3Cs+51JOCQA01Q@mail.gmail.com>

On Tue, Jun 30, 2026 at 01:23:04PM -0400, Jacob Moroni wrote:
> Hi Jason,
> 
> I need to respin this yet again to fix a few more sashiko findings (sorry), but
> I was curious:
> 
> Looking at bnxt_re and irdma, in many cases where we use
> ib_respond_empty_udata, there is also a check for
> ib_is_udata_in_empty.
> 
> Should I make a combined helper? Something like "ib_check_no_udata_io"?

I imagined that the functions should all have a common pattern,
validate the input at the top and generate the response on the success
path.

> Also, for bnxt_re, I think there are places where the ib_respond_empty_udata
> call at the end of the method could be problematic, particularly for "destroy"
> ops since the driver doesn't check the return value. V1 of this series did the
> same for irdma and sashiko freaked out.

It should generally be called at the end of the method, and everything
should be careful to undo their stuff if it fails. Much of that is
bundled into the uobject abort mechanism so it happens transparently
in many cases.

> The issue is that ib_respond_empty_udata can return a failure but the driver
> doesn't check for it.

It does check, I guess this is problematic that the object is already
destroyed and cannot be undestroyed at this point, yet could be
destroyed again.

> Does this seem legitimate? Anyway, a unified helper that is called right
> at the beginning would eliminate the issue if so.

Yes, that does seem like a good reason to make that kind of change.

Jason

      reply	other threads:[~2026-06-30 19:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 23:25 [PATCH rdma-next v2 0/5] RDMA/irdma: Adopt robust udata Jacob Moroni
2026-06-29 23:25 ` [PATCH rdma-next v2 1/5] RDMA/irdma: Enforce empty udata input for no-input ops Jacob Moroni
2026-06-29 23:25 ` [PATCH rdma-next v2 2/5] RDMA/irdma: Use robust udata input copy helpers Jacob Moroni
2026-06-29 23:25 ` [PATCH rdma-next v2 3/5] RDMA/irdma: Use ib_respond_empty_udata where applicable Jacob Moroni
2026-06-29 23:25 ` [PATCH rdma-next v2 4/5] RDMA/irdma: Use robust udata helper for QP creation Jacob Moroni
2026-06-29 23:25 ` [PATCH rdma-next v2 5/5] RDMA/irdma: Enable uverbs_robust_udata compliance flag Jacob Moroni
2026-06-30 17:23 ` [PATCH rdma-next v2 0/5] RDMA/irdma: Adopt robust udata Jacob Moroni
2026-06-30 19:18   ` Jason Gunthorpe [this message]

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=20260630191836.GM7525@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=jmoroni@google.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox