mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
e25303676e
When freqdomain_cpus attribute is read from an offlined cpu, it will cause crash. This change prevents calling cpufreq_show_cpus when policy driver_data is NULL. Crash info: [ 170.814949] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 [ 170.814990] IP: [<ffffffff813b2490>] _find_next_bit.part.0+0x10/0x70 [ 170.815021] PGD 227d30067 PUD 229e56067 PMD 0 [ 170.815043] Oops: 0000 [#2] SMP [ 170.816022] CPU: 3 PID: 3121 Comm: cat Tainted: G D OE 4.3.0-rc3+ #33 ... ... [ 170.816657] Call Trace: [ 170.816672] [<ffffffff813b2505>] ? find_next_bit+0x15/0x20 [ 170.816696] [<ffffffff8160e47c>] cpufreq_show_cpus+0x5c/0xd0 [ 170.816722] [<ffffffffa031a409>] show_freqdomain_cpus+0x19/0x20 [acpi_cpufreq] [ 170.816749] [<ffffffff8160e65b>] show+0x3b/0x60 [ 170.816769] [<ffffffff8129b31c>] sysfs_kf_seq_show+0xbc/0x130 [ 170.816793] [<ffffffff81299be3>] kernfs_seq_show+0x23/0x30 [ 170.816816] [<ffffffff81240f2c>] seq_read+0xec/0x390 [ 170.816837] [<ffffffff8129a64a>] kernfs_fop_read+0x10a/0x160 [ 170.816861] [<ffffffff8121d9b7>] __vfs_read+0x37/0x100 [ 170.816883] [<ffffffff813217c0>] ? security_file_permission+0xa0/0xc0 [ 170.816909] [<ffffffff8121e2e3>] vfs_read+0x83/0x130 [ 170.816930] [<ffffffff8121f035>] SyS_read+0x55/0xc0 ... ... [ 170.817185] ---[ end trace bc6eadf82b2b965a ]--- Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: 4.2+ <stable@vger.kernel.org> # 4.2+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
---|---|---|
.. | ||
acpi-cpufreq.c | ||
amd_freq_sensitivity.c | ||
arm_big_little.c | ||
arm_big_little.h | ||
arm_big_little_dt.c | ||
at32ap-cpufreq.c | ||
blackfin-cpufreq.c | ||
cpufreq-dt.c | ||
cpufreq-nforce2.c | ||
cpufreq.c | ||
cpufreq_conservative.c | ||
cpufreq_governor.c | ||
cpufreq_governor.h | ||
cpufreq_ondemand.c | ||
cpufreq_opp.c | ||
cpufreq_performance.c | ||
cpufreq_powersave.c | ||
cpufreq_stats.c | ||
cpufreq_userspace.c | ||
cris-artpec3-cpufreq.c | ||
cris-etraxfs-cpufreq.c | ||
davinci-cpufreq.c | ||
dbx500-cpufreq.c | ||
e_powersaver.c | ||
elanfreq.c | ||
exynos5440-cpufreq.c | ||
freq_table.c | ||
gx-suspmod.c | ||
highbank-cpufreq.c | ||
hisi-acpu-cpufreq.c | ||
ia64-acpi-cpufreq.c | ||
imx6q-cpufreq.c | ||
integrator-cpufreq.c | ||
intel_pstate.c | ||
Kconfig | ||
Kconfig.arm | ||
Kconfig.powerpc | ||
Kconfig.x86 | ||
kirkwood-cpufreq.c | ||
longhaul.c | ||
longhaul.h | ||
longrun.c | ||
loongson2_cpufreq.c | ||
ls1x-cpufreq.c | ||
Makefile | ||
maple-cpufreq.c | ||
mt8173-cpufreq.c | ||
omap-cpufreq.c | ||
p4-clockmod.c | ||
pasemi-cpufreq.c | ||
pcc-cpufreq.c | ||
pmac32-cpufreq.c | ||
pmac64-cpufreq.c | ||
powernow-k6.c | ||
powernow-k7.c | ||
powernow-k7.h | ||
powernow-k8.c | ||
powernow-k8.h | ||
powernv-cpufreq.c | ||
ppc_cbe_cpufreq.c | ||
ppc_cbe_cpufreq.h | ||
ppc_cbe_cpufreq_pervasive.c | ||
ppc_cbe_cpufreq_pmi.c | ||
pxa2xx-cpufreq.c | ||
pxa3xx-cpufreq.c | ||
qoriq-cpufreq.c | ||
s3c24xx-cpufreq-debugfs.c | ||
s3c24xx-cpufreq.c | ||
s3c64xx-cpufreq.c | ||
s3c2410-cpufreq.c | ||
s3c2412-cpufreq.c | ||
s3c2416-cpufreq.c | ||
s3c2440-cpufreq.c | ||
s5pv210-cpufreq.c | ||
sa1100-cpufreq.c | ||
sa1110-cpufreq.c | ||
sc520_freq.c | ||
sfi-cpufreq.c | ||
sh-cpufreq.c | ||
sparc-us2e-cpufreq.c | ||
sparc-us3-cpufreq.c | ||
spear-cpufreq.c | ||
speedstep-centrino.c | ||
speedstep-ich.c | ||
speedstep-lib.c | ||
speedstep-lib.h | ||
speedstep-smi.c | ||
tegra20-cpufreq.c | ||
tegra124-cpufreq.c | ||
unicore2-cpufreq.c | ||
vexpress-spc-cpufreq.c |