Skip to content

Commit fd50462

Browse files
geertugregkh
authored andcommitted
ASoC: rsnd: Add missing initialization of ADG req_rate
commit 8b27418f300cafbdbbb8cfa9c29d398ed34d6723 upstream. If the "clock-frequency" DT property is not found, req_rate is used uninitialized, and the "audio_clkout" clock will be created with an arbitrary clock rate. This uninitialized kernel stack data may leak to userspace through /sys/kernel/debug/clk/clk_summary, cfr. the value in the "rate" column: clock enable_cnt prepare_cnt rate accuracy phase -------------------------------------------------------------------- audio_clkout 0 0 4001836240 0 0 Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com> Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e974777 commit fd50462

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/sh/rcar/adg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
437437
struct device *dev = rsnd_priv_to_dev(priv);
438438
struct device_node *np = dev->of_node;
439439
u32 ckr, rbgx, rbga, rbgb;
440-
u32 rate, req_rate, div;
440+
u32 rate, req_rate = 0, div;
441441
uint32_t count = 0;
442442
unsigned long req_48kHz_rate, req_441kHz_rate;
443443
int i;

0 commit comments

Comments
 (0)