lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] cpufreq/hotplug: Fix cpu-hotplug cpufreq race conditions
On 02-06-15, 11:50, Preeti U Murthy wrote:
> CPU0 CPU1
>
> store* store*
>
> lock(policy 1) lock(policy 2)
> cpufreq_set_policy() cpufreq_set_policy()
> EXIT() :
> dbs-data->usage_count--
>
> INIT() EXIT()

When will INIT() follow EXIT() in set_policy() for the same governor ?
Maybe not, and so this sequence is hypothetical ?

> dbs_data exists dbs_data->usage_count -- = 0
> kfree(dbs_data)
> dbs-data->usage_count++
> *NULL dereference*

But even if this happens, it should be handled with
dbs_data->mutex_lock, which is used at other places already.

--
viresh


\
 
 \ /
  Last update: 2015-06-02 09:01    [W:1.010 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site