From: sashiko-bot@kernel.org
To: "Ziheng Wei" <zihengw03@163.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/erdma: free common IRQ before destroying CMDQ and AEQ
Date: Sun, 06 Dec 2026 08:56:11 +0000 [thread overview]
Message-ID: <sashiko-outbox-252301@kernel.org> (raw)
In-Reply-To: <20261206084019.4331-1-zihengw03@163.com>
> erdma_remove_dev() and the error unwind path of erdma_probe_dev() call
> erdma_cmdq_destroy() and erdma_eq_destroy(dev, &dev->aeq) before
> erdma_comm_irq_uninit(). Because erdma_hw_reset() does not wait for an
> already in-flight erdma_comm_irq_handler() to finish, freeing the CMDQ
> and AEQ DMA rings before free_irq() can cause a use-after-free in
> erdma_cmdq_completion_handler() or erdma_aeq_event_handler().
>
> Similarly, erdma_probe_dev() requests the common IRQ before initializing
> the AEQ and CMDQ.
>
> Request the common IRQ after initializing the AEQ and CMDQ, and call
> erdma_comm_irq_uninit() before destroying the CMDQ and AEQ in both
> erdma_probe_dev() error unwind and erdma_remove_dev().
>
> Found by LLM-assisted static analysis. Compile-tested on x86_64.
>
> Fixes: d55e6fb4803c ("RDMA/erdma: Add the erdma module")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ziheng Wei <zihengw03@163.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261206084019.4331-1-zihengw03@163.com?part=1
prev parent reply other threads:[~2026-12-06 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-06 8:40 [PATCH] RDMA/erdma: free common IRQ before destroying CMDQ and AEQ Ziheng Wei
2026-12-06 8:56 ` 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-252301@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zihengw03@163.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