]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rsnd: Add missing initialization of ADG req_rate
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 28 Oct 2015 15:03:48 +0000 (16:03 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 16 Nov 2015 10:09:29 +0000 (10:09 +0000)
commita5f2fa89a20048233bd01b0387c0960ed240fd82
tree1b376e3a759b9252da3aea9822ed1ff9af2fd9e8
parent8514a97bdab93419a2c3639a0f2690cde8e56b1e
ASoC: rsnd: Add missing initialization of ADG req_rate

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>
sound/soc/sh/rcar/adg.c