[<prev] [next>] [day] [month] [year] [list]
Message-ID: <12e8e7e5-36c9-9eaf-89a7-1913755b8b77@collabora.com>
Date: Fri, 10 Mar 2023 10:30:36 +0100
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: "jia-wei.chang" <jia-wei.chang@...iatek.com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Kevin Hilman <khilman@...libre.com>,
Rex-BC Chen <rex-bc.chen@...iatek.com>
Cc: linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Project_Global_Chrome_Upstream_Group@...iatek.com,
hsinyi@...gle.com, Nick <vincent@...temli.org>,
Dan Carpenter <error27@...il.com>
Subject: Re: [PATCH v1 2/3] cpufreq: mediatek: fix KP caused by handler usage
after regulator_put/clk_put
Il 10/03/23 06:17, jia-wei.chang ha scritto:
> From: "Jia-Wei Chang" <jia-wei.chang@...iatek.com>
>
> Any kind of failure in mtk_cpu_dvfs_info_init() will lead to calling
> regulator_put() or clk_put() and the KP will occur since the regulator/clk
> handlers are used after released in mtk_cpu_dvfs_info_release().
>
> To prevent the usage after regulator_put()/clk_put(), the regulator/clk
> handlers are reassigned to NULL value for validation check afterwards.
>
> Signed-off-by: Jia-Wei Chang <jia-wei.chang@...iatek.com>
> Fixes: 4b9ceb757bbb ("cpufreq: mediatek: Enable clocks and regulators")
> Reported-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> Link: https://lore.kernel.org/linux-arm-kernel/20220921071913.p7kwsjnnuad2jgvk@vireshk-i7/T/
Actually, it's not just Reported-by, but also please add:
Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Anyway, apart from that:
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Powered by blists - more mailing lists