Re: [PATCH] cpufreq: Fix the driver can not be unloaded issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 April 2013 13:58,  <Yuantian.Tang@xxxxxxxxxxxxx> wrote:
> From: Tang Yuantian <yuantian.tang@xxxxxxxxxxxxx>
>
> The driver compiled as a module can not be unloaded if there
> are more than one cpu in policy->cpus. That's caused by
> cpufreq_cpu_get() in cpufreq_add_dev_symlink(); It keep increasing
> the module reference count.
> This patch splites the module and policy reference count. It keeps
> the module reference count unchanged and uses the policy reference
> count to track the resource.
>
> Signed-off-by: Tang Yuantian <Yuantian.Tang@xxxxxxxxxxxxx>
> ---
>  drivers/cpufreq/cpufreq.c | 16 +++-------------
>  1 file changed, 3 insertions(+), 13 deletions(-)

I didn't quite get the problem you mentioned.. I haven't seen any issues
with the core as of now.

When we unload a module we must call cpufreq_unregister_driver(), which
will eventually call subsys_interface_unregister() and so cpufreq_remove_dev()
will be called for each cpu. And so all the counts should be fine and eventually
module should get unloaded.

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux