Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a532c015 authored by Saravana Kannan's avatar Saravana Kannan Committed by Junjie Wu
Browse files

cpufreq: Fix race between policy initialization and cpufreq_cpu_get()



When the first CPU in a policy comes online or is brought up for the first
time, a policy is allocated for it. However, the kobject corresponding to
it is not allocated until later. So, if cpufreq_cpu_get() is called in
this interval, it would try to "get" an uninitialized kobject. Avoid this
by allocating the kobject at the same time as allocating the policy.

Change-Id: I676408da41e3feccb85b74e2a4a23f3a1f6892bd
Signed-off-by: default avatarSaravana Kannan <skannan@codeaurora.org>
parent 718b9859
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment