lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Mar 2023 15:48:48 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        agross@...nel.org, andersson@...nel.org
Cc:     konrad.dybcio@...aro.org, mturquette@...libre.com,
        linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Amit Pundir <amit.pundir@...aro.org>
Subject: Re: [PATCH] clk: qcom: gfm-mux: use runtime pm while accessing registers

Quoting Srinivas Kandagatla (2023-03-21 13:33:49)
> 
> 
> On 21/03/2023 18:46, Stephen Boyd wrote:
> > Quoting Srinivas Kandagatla (2023-03-21 10:57:58)
> >> gfm mux driver does support runtime pm but we never use it while
> >> accessing registers. Looks like this driver was getting lucky and
> >> totally depending on other drivers to leave the clk on.
> >>
> >> Fix this by doing runtime pm while accessing registers.
> >>
> >> Fixes: a2d8f507803e ("clk: qcom: Add support to LPASS AUDIO_CC Glitch Free Mux clocks")
> >> Cc: stable@...r.kernel.org
> >> Reported-by: Amit Pundir <amit.pundir@...aro.org>
> > 
> > Is there a link to the report?
> 
> https://www.spinics.net/lists/stable/msg638380.html

Please add a Link: after the reported-by and use a lore link instead of
spinics please.

> >>   {
> >>          struct clk_gfm *clk = to_clk_gfm(hw);
> >>          unsigned int val;
> >> +       int ret;
> >> +
> >> +       ret = pm_runtime_resume_and_get(clk->priv->dev);
> > 
> > Doesn't the clk framework already do this? Why do we need to do it
> > again?
> 
> You are right, clk core already does do pm_runtime_resume_and_get for 
> set_parent.
> 
> this looks redundant here.
> 
> 
> so we need only need to add this for get_parent
> 

The get_parent() clk op is called from a couple places in the clk
framework. I guess that you're getting called from
clk_core_reparent_orphans() where the runtime PM count isn't
incremented? Can you confirm? Either way, this should be fixed in the
framework and not in the driver.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ