All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.10] spi: meson-spicc: Fix double-put in remove path
@ 2026-06-10 16:11 ` Alexey Panov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Panov @ 2026-06-10 16:11 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Alexey Panov, Mark Brown, Kevin Hilman, Neil Armstrong,
	Jerome Brunet, Martin Blumenstingl, Dongliang Mu, linux-spi,
	linux-arm-kernel, linux-amlogic, linux-kernel, Neil Armstrong,
	lvc-project, Felix Gu, Johan Hovold

From: Felix Gu <ustc.gu@gmail.com>

commit 63542bb402b7013171c9f621c28b609eda4dbf1f upstream.

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.

Fixes: 8311ee2164c5 ("spi: meson-spicc: fix memory leak in meson_spicc_remove")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260322-rockchip-v1-1-fac3f0c6dad8@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
[ Alexey: Remove the equivalent legacy spi_master_put() call used in
  linux-5.10.y. ]
Signed-off-by: Alexey Panov <apanov@astralinux.ru>
---
Backport fix for CVE-2026-31489
 drivers/spi/spi-meson-spicc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
index 6974a1c947aa..ae818e7df791 100644
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -863,8 +863,6 @@ static int meson_spicc_remove(struct platform_device *pdev)
 	clk_disable_unprepare(spicc->core);
 	clk_disable_unprepare(spicc->pclk);
 
-	spi_master_put(spicc->master);
-
 	return 0;
 }
 
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-11  0:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 16:11 [PATCH 5.10] spi: meson-spicc: Fix double-put in remove path Alexey Panov
2026-06-10 16:11 ` Alexey Panov
2026-06-11  0:45 ` Sasha Levin
2026-06-11  0:45   ` Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.