Re: [PATCH] cpufreq: fix overflow in cpufreq_table_find_index_dl()

2016-10-17 Thread Sergey Senozhatsky
On (10/18/16 00:14), Sergey Senozhatsky wrote: [..] > include/linux/cpufreq.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h > index 5fa55fc..2a7aa0b 100644 > --- a/include/linux/cpufreq.h > +++

Re: [PATCH] cpufreq: fix overflow in cpufreq_table_find_index_dl()

2016-10-17 Thread Sergey Senozhatsky
On (10/18/16 00:14), Sergey Senozhatsky wrote: [..] > include/linux/cpufreq.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h > index 5fa55fc..2a7aa0b 100644 > --- a/include/linux/cpufreq.h > +++

[PATCH] cpufreq: fix overflow in cpufreq_table_find_index_dl()

2016-10-17 Thread Sergey Senozhatsky
'best' is always less or equals to 'pos', so `best - pos' returns a negative value which is then getting casted to `unsigned int' and passed to __cpufreq_driver_target()->acpi_cpufreq_target() for policy->freq_table election. This results in: BUG: unable to handle kernel paging request at

[PATCH] cpufreq: fix overflow in cpufreq_table_find_index_dl()

2016-10-17 Thread Sergey Senozhatsky
'best' is always less or equals to 'pos', so `best - pos' returns a negative value which is then getting casted to `unsigned int' and passed to __cpufreq_driver_target()->acpi_cpufreq_target() for policy->freq_table election. This results in: BUG: unable to handle kernel paging request at