From: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
To: Borislav Petkov <bp@alien8.de>
Cc: ssengar@linux.microsoft.com, shubhrajyoti.datta@amd.com,
tony.luck@intel.com, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] EDAC/versalnet: Fix teardown ordering in mc_remove()
Date: Thu, 9 Apr 2026 15:03:29 +0530 [thread overview]
Message-ID: <897f996e-1d43-4817-88af-d980f321d0c6@linux.microsoft.com> (raw)
In-Reply-To: <20260406082353.GAadNtmUQqtwhw4yZS@fat_crate.local>
On 06-04-2026 13:53, Borislav Petkov wrote:
> On Mon, Apr 06, 2026 at 10:56:17AM +0530, Prasanna Kumar T S M wrote:
>>> Sashiko has found things, pls addres them:
>>>
>>> https://sashiko.dev/#/patchset/20260401111836.2342918-1-ptsm%40linux.microsoft.com
>>>
>>
>> I asked AI to validate Sashiko's comment.
>
> So I asked *you* to address the Sashiko review. You go and ask another AI to
> validate the review.
>
> Now, if I go and paste the whole conversation to a third AI, the f*ckup is
> complete.
>
> Tell me: is that the goal of this exercise? Let AIs do the thinking
> for us and we can all go shopping?
>
> Or maybe *you* should go review Sashiko's review and say, I agree because
> <proper, comprehensible explanation> or I don't agree because <also proper,
> comprehensible explanation>.
>
> Then *I* go and verify that.
>
> Hmm...
>
Hi,
Sashiko review says
-------------------
If an MCDI response message arrives after priv->mcdi is freed but before the
RPMSG endpoint is destroyed, could the still-active rpmsg_cb() pass the
dangling priv->mcdi pointer to cdx_mcdi_process_cmd(), leading to a
use-after-free?
-------------------
The review is based on the assumption that priv->mcdi is freed before
unregister_rpmsg_driver(). But priv->mcdi is valid till the end of the
function.
The cdx_mcdi_finish() waits for the mcdi->workqueue to finish processing
and the mcdi->workqueue is destroyed. Any subsequent rpmsg_cb() calls
cdx_mcdi_process_cmd() which safely without doing anything if mcdi
(priv->mcdi->mcdi) is NULL. The review can be safely ignored. Other path
in rpmsg_cb() accesses priv->adec and priv->regs, both of them are valid
and doesn't cause any use-after-free issue.
The review is a false positive and can be ignored.
Thanks,
Prasanna Kumar
prev parent reply other threads:[~2026-04-09 9:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 11:18 [PATCH v2 1/3] EDAC/versalnet: Fix teardown ordering in mc_remove() Prasanna Kumar T S M
2026-04-01 11:18 ` [PATCH v2 2/3] EDAC/versalnet: Fix device name memory leak Prasanna Kumar T S M
2026-04-01 11:19 ` [PATCH v2 3/3] EDAC/versalnet: Fix device_register() error handling in init_one_mc() Prasanna Kumar T S M
2026-04-09 9:46 ` Prasanna Kumar T S M
2026-04-03 10:34 ` [PATCH v2 1/3] EDAC/versalnet: Fix teardown ordering in mc_remove() Borislav Petkov
2026-04-06 5:26 ` Prasanna Kumar T S M
2026-04-06 8:23 ` Borislav Petkov
2026-04-09 9:33 ` Prasanna Kumar T S M [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=897f996e-1d43-4817-88af-d980f321d0c6@linux.microsoft.com \
--to=ptsm@linux.microsoft.com \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shubhrajyoti.datta@amd.com \
--cc=ssengar@linux.microsoft.com \
--cc=tony.luck@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