Re: [PATCH] clk: fix slab-out-of-bounds error in devm_clk_release

From: Stephen Boyd
Date: Tue Aug 22 2023 - 18:24:48 EST


Quoting Andrey Skvortsov (2023-08-05 01:48:47)
> Problem can be reproduces by unloading snd_soc_simple_card, because in
> devm_get_clk_from_child data were allocated as `struct clk`,
> but devm_clk_release expects `struct devm_clk_state`.
>
[...]
> Fixes: abae8e57e49a ("clk: generalize devm_clk_get() a bit")
> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@xxxxxxxxx>
> ---

Applied to clk-fixes but I removed the state->exit assignment because
that's the default. I also noticed that devm_clk_put() is broken in a
similar way. Sheesh!