From: Markus Elfring <Markus.Elfring@web.de>
To: Felix Gu <ustc.gu@gmail.com>,
linux-phy@lists.infradead.org, linux-usb@vger.kernel.org,
Neil Armstrong <neil.armstrong@linaro.org>,
Vincent Shih <vincent.sunplus@gmail.com>,
Vinod Koul <vkoul@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2 1/2] phy: sunplus: fix memory leak in update_disc_vol()
Date: Thu, 20 Aug 2026 18:00:14 +0200 [thread overview]
Message-ID: <1cebfec8-b63a-4fd8-8381-3ab88c24a091@web.de> (raw)
In-Reply-To: <20260807-sunplus-v2-1-d5379c664dfc@gmail.com>
> nvmem_cell_read() returns a kmalloc'd buffer that update_disc_vol()
> never freed. Free it after extracting the disconnect-voltage value.
How do you think about to apply the attribute “__free(kfree)” also in such
a function implementation?
https://elixir.bootlin.com/linux/v7.2/source/include/linux/slab.h#L596
Regards,
Markus
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-08-20 16:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 13:16 [PATCH v2 0/2] phy: sunplus: fix two issues in update_disc_vol() Felix Gu
2026-08-07 13:16 ` [PATCH v2 1/2] phy: sunplus: fix memory leak " Felix Gu
2026-08-07 13:32 ` sashiko-bot
2026-08-20 16:00 ` Markus Elfring [this message]
2026-08-07 13:17 ` [PATCH v2 2/2] phy: sunplus: fix ERR_PTR deref " Felix Gu
2026-08-07 13:38 ` sashiko-bot
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=1cebfec8-b63a-4fd8-8381-3ab88c24a091@web.de \
--to=markus.elfring@web.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=ustc.gu@gmail.com \
--cc=vincent.sunplus@gmail.com \
--cc=vkoul@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