From: Viresh Kumar <viresh.kumar@linaro.org>
To: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
Cc: Runyu Xiao <runyu.xiao@seu.edu.cn>,
rafael@kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, jianhao.xu@seu.edu.cn,
stable@vger.kernel.org
Subject: Re: [PATCH] cpufreq: initialize policy rwsem before sysfs publication
Date: Tue, 1 Sep 2026 10:20:07 +0530 [thread overview]
Message-ID: <apZZf21vsqy3o_WQ@vireshk-B250M-D3H> (raw)
In-Reply-To: <83f87db8-fa13-41d0-ae52-544d22e228e6@oss.qualcomm.com>
On 31-08-26, 20:13, Zhongqiu Han wrote:
> On 8/30/2026 11:53 PM, Runyu Xiao wrote:
> > cpufreq_policy_alloc() initializes policy->rwsem after
> > kobject_init_and_add() has created the policy sysfs directory and its
> > default attributes. A sysfs access can therefore reach a policy callback
> > before the semaphore has been initialized.
> >
> > Initialize policy->rwsem before publishing the policy kobject so sysfs
> > callbacks always see an initialized semaphore.
> >
> > Fixes: ad7722dab729 ("cpufreq: create per policy rwsem instead of per CPU cpu_policy_rwsem")
>
> The tag should be 2fc3384dc75b ("cpufreq: Initialize policy->kobj while
> allocating policy").
Right.
--
viresh
next prev parent reply other threads:[~2026-09-01 4:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 15:53 [PATCH] cpufreq: initialize policy rwsem before sysfs publication Runyu Xiao
2026-08-31 5:29 ` Viresh Kumar
2026-08-31 12:13 ` Zhongqiu Han
2026-09-01 4:50 ` Viresh Kumar [this message]
2026-09-02 4:19 ` [PATCH v3] " Runyu Xiao
2026-09-02 4:27 ` Viresh Kumar
2026-09-04 15:06 ` Rafael J. Wysocki (Intel)
2026-09-01 12:19 ` [PATCH v2] " Runyu Xiao
2026-09-01 13:07 ` Zhongqiu Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=apZZf21vsqy3o_WQ@vireshk-B250M-D3H \
--to=viresh.kumar@linaro.org \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=runyu.xiao@seu.edu.cn \
--cc=stable@vger.kernel.org \
--cc=zhongqiu.han@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox