This is a note to let you know that I've just added the patch titled clk: Fix pointer casting to prevent oops in devm_clk_release() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: clk-fix-pointer-casting-to-prevent-oops-in-devm_clk_release.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 8b3d743fc9e2542822826890b482afabf0e7522a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@xxxxxxxxxxxxxx> Date: Mon, 20 Jun 2022 19:18:15 +0200 Subject: clk: Fix pointer casting to prevent oops in devm_clk_release() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> commit 8b3d743fc9e2542822826890b482afabf0e7522a upstream. The release function is called with a pointer to the memory returned by devres_alloc(). I was confused about that by the code before the generalization that used a struct clk **ptr. Reported-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Fixes: abae8e57e49a ("clk: generalize devm_clk_get() a bit") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20220620171815.114212-1-u.kleine-koenig@xxxxxxxxxxxxxx Tested-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Tested-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx> Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/clk/clk-devres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/clk/clk-devres.c +++ b/drivers/clk/clk-devres.c @@ -11,7 +11,7 @@ struct devm_clk_state { static void devm_clk_release(struct device *dev, void *res) { - struct devm_clk_state *state = *(struct devm_clk_state **)res; + struct devm_clk_state *state = res; if (state->exit) state->exit(state->clk); Patches currently in stable-queue which might be from u.kleine-koenig@xxxxxxxxxxxxxx are queue-5.15/leds-lm3601x-don-t-use-mutex-after-it-was-destroyed.patch queue-5.15/can-rx-offload-can_rx_offload_init_queue-fix-typo.patch queue-5.15/clk-provide-new-devm_clk-helpers-for-prepared-and-en.patch queue-5.15/iio-ltc2497-fix-reading-conversion-results.patch queue-5.15/clk-generalize-devm_clk_get-a-bit.patch queue-5.15/clk-fix-pointer-casting-to-prevent-oops-in-devm_clk_release.patch