Re: od_set_powersave_bias: NULL pointer dereference

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

 



On 26 June 2013 19:58, Jacob Shin <jacob.shin@xxxxxxx> wrote:
> On Wed, Jun 26, 2013 at 12:18:27PM +0530, Viresh Kumar wrote:

>> I am not sure if this is enough. What if we had ondemand as the
>> governor initially, then we changed it to something else. Now also
>> cur_policy contains a address and isn't zero.
>
> Right, so we check below ..
>
>>
>> >                 cpumask_or(&done, &done, policy->cpus);
>> > +
>> > +               if (policy->governor != &cpufreq_gov_ondemand)
>> > +                       continue;
>
> This should catch that case no ?

Policy might be freed and reallocated by then. And so doing
policy->governor is dangerous.
--
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