Re: [PATCH v6 1/2] cpufreq: Abort show/store for half initialized policy

From: Viresh Kumar
Date: Mon May 16 2022 - 06:25:26 EST


On Mon, 16 May 2022 at 04:03, Schspa Shi <schspa@xxxxxxxxx> wrote:
>
> If policy initialization fails after the sysfs files are created,
> there is a possibility that we may end up running show()/store()
> callbacks for half initialized policies, which may have unpredictable
> outcomes.
>
> Abort show/store in such a case by making sure the policy is active.
> Also inactivate the policy on such failures.
>
> Signed-off-by: Schspa Shi <schspa@xxxxxxxxx>

Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>