From: Leon Romanovsky <leon@kernel.org>
To: Zhu Yanjun <zyjzyj2000@gmail.com>, Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiasheng Jiang <jiashengjiangcool@gmail.com>
Subject: Re: [PATCH v2] RDMA/rxe: Fix double free in rxe_srq_from_init
Date: Tue, 13 Jan 2026 08:52:53 -0500 [thread overview]
Message-ID: <176831237357.425757.8303337207622192436.b4-ty@kernel.org> (raw)
In-Reply-To: <20260112015412.29458-1-jiashengjiangcool@gmail.com>
On Mon, 12 Jan 2026 01:54:12 +0000, Jiasheng Jiang wrote:
> In rxe_srq_from_init(), the queue pointer 'q' is assigned to
> 'srq->rq.queue' before copying the SRQ number to user space.
> If copy_to_user() fails, the function calls rxe_queue_cleanup()
> to free the queue, but leaves the now-invalid pointer in
> 'srq->rq.queue'.
>
> The caller of rxe_srq_from_init() (rxe_create_srq) eventually
> calls rxe_srq_cleanup() upon receiving the error, which triggers
> a second rxe_queue_cleanup() on the same memory, leading to a
> double free.
>
> [...]
Applied, thanks!
[1/1] RDMA/rxe: Fix double free in rxe_srq_from_init
https://git.kernel.org/rdma/rdma/c/c5ea4126b4fa1f
Best regards,
--
Leon Romanovsky <leon@kernel.org>
next prev parent reply other threads:[~2026-01-13 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 1:54 Jiasheng Jiang
2026-01-12 16:49 ` Zhu Yanjun
2026-01-13 13:52 ` Leon Romanovsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-01-11 22:31 [PATCH] " Zhu Yanjun
2026-01-12 1:55 ` [PATCH v2] " Jiasheng Jiang
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=176831237357.425757.8303337207622192436.b4-ty@kernel.org \
--to=leon@kernel.org \
--cc=jgg@ziepe.ca \
--cc=jiashengjiangcool@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=zyjzyj2000@gmail.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
all inboxes | Powered by JetHome®