From: sashiko-bot@kernel.org
To: "Jaeyeong Lee" <lee@jaeyeong.cc>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3] RDMA/mlx5: Preserve DEVX objects after failed output copy
Date: Fri, 27 Nov 2026 03:26:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-236528@kernel.org> (raw)
In-Reply-To: <179574905000.68536.2524255610860968331@jaeyeong.cc>
> A DEVX create command can succeed before indirect mkey registration or
> copying the command output to userspace fails. The current unwind path
> destroys the hardware object directly, ignores a destroy failure, and
> frees struct devx_obj.
>
> If the object cannot be destroyed, it remains live while its software
> wrapper is gone. A later event or cleanup can then access the freed
> wrapper.
>
> Mark the uobject as containing a valid hardware object once all state
> required by devx_obj_cleanup() is initialized. Return later errors
> directly so the uverbs abort path runs devx_obj_cleanup(). If destruction
> fails, rdma_alloc_abort_uobject() commits the uobject and keeps it alive
> for another cleanup attempt at file close.
>
> This also routes indirect mkey registration failures through the same
> cleanup path and removes the duplicate manual unwind.
>
> Fixes: 7efce3691d33 ("IB/mlx5: Add obj create and destroy functionality")
> Cc: stable@vger.kernel.org
> Signed-off-by: Finder16 <nakamurajames123@gmail.com>
> Signed-off-by: Jaeyeong Lee <lee@jaeyeong.cc>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/179574905000.68536.2524255610860968331@jaeyeong.cc?part=1
prev parent reply other threads:[~2026-11-27 3:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 10:53 [PATCH] RDMA/mlx5: Fix UAF after DEVX DCT create failure Jaeyeong Lee
2026-11-11 11:13 ` sashiko-bot
2026-11-15 13:51 ` Leon Romanovsky
2026-11-22 10:37 ` [PATCH v2] RDMA/mlx5: Preserve DEVX objects after failed output copy Jaeyeong Lee
2026-11-22 10:39 ` Jaeyeong Lee
2026-11-25 13:12 ` Leon Romanovsky
2026-11-25 14:56 ` Jason Gunthorpe
2026-11-22 10:48 ` sashiko-bot
2026-11-27 3:10 ` [PATCH v3] " Jaeyeong Lee
2026-11-27 3:26 ` sashiko-bot [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=sashiko-outbox-236528@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=lee@jaeyeong.cc \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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