From: "Gupta, Nipun" <nipun.gupta@amd.com>
To: Prasanna Kumar T S M <ptsm@linux.microsoft.com>,
nikhil.agarwal@amd.com, abhijit.gangurde@amd.com,
puneet.gupta@amd.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH 2/2] cdx: Fix double free when sysfs file creation fails
Date: Tue, 28 Apr 2026 18:57:49 +0530 [thread overview]
Message-ID: <359e10c3-3a06-d387-47c2-a0dff879e45f@amd.com> (raw)
In-Reply-To: <32170102-490f-4eb3-bfe5-faa38848129f@linux.microsoft.com>
Hi Prasanna,
On 27-04-2026 12:37, Prasanna Kumar T S M wrote:
> Hi Nipun,
>
> On 01-04-2026 15:12, Gupta, Nipun wrote:
>>
>>
>> On 20-03-2026 15:51, Prasanna Kumar T S M wrote:
>>> In cdx_create_res_attr(), if sysfs_create_bin_file() fails, the code
>>> frees res_attr but doesn't set cdx_dev->res_attr[num] to NULL. This
>>> leaves a dangling pointer in the array. Then cdx_destroy_res_attr()
>>> frees the already-freed memory. Fix the double free by initializing
>>> cdx_dev->res_attr[num] after sysfs_create_bin_file() completes.
>>>
>>> Fixes: aeda33ab8160 ("cdx: create sysfs bin files for cdx resources")
>>> Cc: stable@vger.kernel.org
>>> Signed-off-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
>>
>> Acked-by: Nipun Gupta <nipun.gupta@amd.com>
>
> I am not able to see this patch in linux-next, although I can see the
> other patch.
Can you please resend this patch as a separate individual patch so that
Greg can pick it up. The other patch i.e. patch 1/2 of this was applied
to vfio-next tree as a part of series
https://lore.kernel.org/all/20260417202800.88287-1-alex.williamson@nvidia.com/.
Thanks,
Nipun
next prev parent reply other threads:[~2026-04-28 13:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 10:19 [PATCH 1/2] vfio/cdx: Fix NULL pointer dereference in interrupt trigger path Prasanna Kumar T S M
2026-03-20 10:21 ` [PATCH 2/2] cdx: Fix double free when sysfs file creation fails Prasanna Kumar T S M
2026-04-01 9:42 ` Gupta, Nipun
2026-04-27 7:07 ` Prasanna Kumar T S M
2026-04-28 13:27 ` Gupta, Nipun [this message]
2026-04-01 9:41 ` [PATCH 1/2] vfio/cdx: Fix NULL pointer dereference in interrupt trigger path Gupta, Nipun
2026-04-01 18:22 ` Alex Williamson
2026-04-02 4:44 ` Prasanna Kumar T S M
2026-04-02 14:16 ` Alex Williamson
2026-04-06 4:18 ` Prasanna Kumar T S M
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=359e10c3-3a06-d387-47c2-a0dff879e45f@amd.com \
--to=nipun.gupta@amd.com \
--cc=abhijit.gangurde@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikhil.agarwal@amd.com \
--cc=ptsm@linux.microsoft.com \
--cc=puneet.gupta@amd.com \
--cc=stable@vger.kernel.org \
/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