Re: [PATCH V2] acpi-cpufreq: replace per_cpu with driver_data of policy
From: Viresh Kumar
Date: Wed Jul 08 2015 - 00:51:43 EST
Hi Dmitry,
On 07-07-15, 10:11, Dmitry Torokhov wrote:
> > + data = policy->driver_data;
> > + cpufreq_cpu_put(policy);
>
> If we put policy here can we guarantee that memory pointed to by data
> stays valid? Shoudln't we issue cpufreq_cpu_put(policy) after we done
> assessing the pointer?
Ideally yes, you are right. But this was a special case as a callback
of the cpufreq-driver is being called and any such issues must be
handled at the core level, it at all they are relevant.
So probably we can do cpufreq_cpu_put() as soon as we have used it.
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/