[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150708045103.GA19130@linux>
Date: Wed, 8 Jul 2015 10:21:03 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Pan Xinhui <xinhuix.pan@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-pm@...r.kernel.org, rjw@...ysocki.net,
"mnipxh@....com" <mnipxh@....com>,
"yanmin_zhang@...ux.intel.com" <yanmin_zhang@...ux.intel.com>
Subject: Re: [PATCH V2] acpi-cpufreq: replace per_cpu with driver_data of
policy
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists