From: Dinh Nguyen <dinguyen@kernel.org>
To: tze.yee.ng@altera.com, Richard Gong <richard.gong@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Tull <atull@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] firmware: stratix10-svc: fix memory leaks and list corruption bugs
Date: Wed, 24 Jun 2026 00:22:47 -0500 [thread overview]
Message-ID: <d4b3c9f1-916c-46da-af7e-a899d158e58c@kernel.org> (raw)
In-Reply-To: <cdf841bb13713b8d335e454bafb3947fd9d8b364.1782269400.git.tze.yee.ng@altera.com>
On 6/23/26 22:47, tze.yee.ng@altera.com wrote:
> From: Tze Yee Ng <tze.yee.ng@altera.com>
>
> Fix a memory leak when gen_pool_alloc() fails by freeing pmem on the error
> path. Switch pmem allocation from devm_kzalloc() to kzalloc() with
> explicit kfree() in the free path to match its list-managed lifetime.
> Remove the erroneous list_del(&svc_data_mem) which corrupted the list head
> on failed lookups.
>
> Fixes: 7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver")
> Cc: stable@vger.kernel.org # 5.0+
>
Remove blank line.
> Signed-off-by: Tze Yee Ng <tze.yee.ng@altera.com>
> ---
> Changes in v2:
> - Remove if (!chan || !kaddr) early return from stratix10_svc_free_memory()
> per review; failed lookup is handled by dropping list_del(&svc_data_mem).
> - Add Cc: stable@vger.kernel.org # 5.0+.
> - Minor commit message cleanup (lifetime spelling, subject line).
> ---
Dinh
prev parent reply other threads:[~2026-06-24 5:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 3:47 tze.yee.ng
2026-06-24 5:22 ` Dinh Nguyen [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=d4b3c9f1-916c-46da-af7e-a899d158e58c@kernel.org \
--to=dinguyen@kernel.org \
--cc=atull@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.gong@intel.com \
--cc=tze.yee.ng@altera.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®