All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Maher Sanalla <msanalla@nvidia.com>, linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()
Date: Wed, 19 Feb 2025 13:53:35 -0400	[thread overview]
Message-ID: <20250219175335.GA28076@nvidia.com> (raw)
In-Reply-To: <20250219155647.GI53094@unreal>

On Wed, Feb 19, 2025 at 05:56:47PM +0200, Leon Romanovsky wrote:
> On Wed, Feb 19, 2025 at 10:46:16AM -0400, Jason Gunthorpe wrote:
> > On Wed, Feb 19, 2025 at 03:52:05PM +0200, Leon Romanovsky wrote:
> > > From: Maher Sanalla <msanalla@nvidia.com>
> > > 
> > > Currently, the IB uverbs API calls uobj_get_uobj_read(), which in turn
> > > uses the rdma_lookup_get_uobject() helper to retrieve user objects.
> > > In case of failure, uobj_get_uobj_read() returns NULL, overriding the
> > > error code from rdma_lookup_get_uobject(). The IB uverbs API then
> > > translates this NULL to -EINVAL, masking the actual error and
> > > complicating debugging.
> > 
> > This may have been deliberate as this old stuff is not supposed to be
> > returning weird error codes.
> 
> I assumed that this was the reason for such overwrite in the past, but
> is this continue to be true in 2025?

Maybe, it is ABI that leaks out libiverbs

But also, maybe nobody cares. There is a small chance places are
relying on detecting certain errnos.

> > What error code are you missing here?
> 
> Error returned from modify QP was masked by setting real error to be -EINVAL.

What errno was it though? What other errors are there that are now no
longer supressed?

I think the commit message needs a deeper analysis to be convincing
the ABI break is low risk

Jason

  reply	other threads:[~2025-02-19 17:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 13:52 [PATCH rdma-next] RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject() Leon Romanovsky
2025-02-19 14:46 ` Jason Gunthorpe
2025-02-19 15:56   ` Leon Romanovsky
2025-02-19 17:53     ` Jason Gunthorpe [this message]
2025-02-20  6:59       ` Leon Romanovsky
2025-02-20  9:06         ` Leon Romanovsky
2025-02-20 13:53           ` Jason Gunthorpe
2025-02-23  8:52             ` Leon Romanovsky
2025-02-26 12:36               ` Maher Sanalla

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=20250219175335.GA28076@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=msanalla@nvidia.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.