From: Johan Hovold <johan@kernel.org>
To: Felix Gu <ustc.gu@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Dongliang Mu <mudongliangabcd@gmail.com>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: meson-spicc: Fix double-put in remove path
Date: Mon, 23 Mar 2026 11:55:32 +0100 [thread overview]
Message-ID: <acEcJJgoaaOdBz70@hovoldconsulting.com> (raw)
In-Reply-To: <20260322-rockchip-v1-1-fac3f0c6dad8@gmail.com>
On Sun, Mar 22, 2026 at 09:29:56PM +0800, Felix Gu wrote:
> meson_spicc_probe() registers the controller with
> devm_spi_register_controller(), so teardown already drops the
> controller reference via devm cleanup.
>
> Calling spi_controller_put() again in meson_spicc_remove()
> causes a double-put.
Indeed it does:
Reviewed-by: Johan Hovold <johan@kernel.org>
> Fixes: 8311ee2164c5 ("spi: meson-spicc: fix memory leak in meson_spicc_remove")
While only root can trigger this it should probably still go stable:
Cc: stable@vger.kernel.org
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
How did you find this one? Are you using some kind of static analysis
tool or LLM?
Johan
next prev parent reply other threads:[~2026-03-23 10:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-22 13:29 [PATCH] spi: meson-spicc: Fix double-put in remove path Felix Gu
2026-03-22 15:40 ` Markus Elfring
2026-03-23 10:55 ` Johan Hovold [this message]
2026-03-23 11:33 ` Felix Gu
2026-03-23 18:44 ` Markus Elfring
2026-03-23 18:47 ` Mark Brown
2026-03-23 18:32 ` [PATCH] " Mark Brown
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=acEcJJgoaaOdBz70@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=broonie@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mudongliangabcd@gmail.com \
--cc=neil.armstrong@linaro.org \
--cc=ustc.gu@gmail.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