summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-uniphier
diff options
context:
space:
mode:
authorKai Shen <shenkai8@huawei.com>2019-11-07 06:08:17 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-11-08 11:49:15 +0100
commite6e8df07268c1f75dd9215536e2ce4587b70f977 (patch)
treee175fbffe87247ea20ffee6fb4e32912f7d939ff /arch/arm/mach-uniphier
parentcpufreq: intel_pstate: Fix plain int as pointer warning from sparse (diff)
downloadlinux-e6e8df07268c1f75dd9215536e2ce4587b70f977.tar.xz
linux-e6e8df07268c1f75dd9215536e2ce4587b70f977.zip
cpufreq: Add NULL checks to show() and store() methods of cpufreq
Add NULL checks to show() and store() in cpufreq.c to avoid attempts to invoke a NULL callback. Though some interfaces of cpufreq are set as read-only, users can still get write permission using chmod which can lead to a kernel crash, as follows: chmod +w /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq This bug was found in linux 4.19. Signed-off-by: Kai Shen <shenkai8@huawei.com> Reported-by: Feilong Lin <linfeilong@huawei.com> Reviewed-by: Feilong Lin <linfeilong@huawei.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> [ rjw: Subject & changelog ] Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/arm/mach-uniphier')
0 files changed, 0 insertions, 0 deletions