Patch "cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus" has been added to the 4.2-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
cpufreq-acpi_cpufreq-prevent-crash-on-reading-freqdomain_cpus.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
e25303676e18a7947185a34e26dd08cf0c0ea573Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <[email protected]>
Date: Wed, 7 Oct 2015 13:50:43 -0700
Subject: cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus
From: Srinivas Pandruvada <[email protected]>
commit e25303676e18a7947185a34e26dd08cf0c0ea573 upstream.
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 ]---
--- drivers/cpufreq/acpi-cpufreq.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/cpufreq/acpi-cpufreq.c +3 -0
@@ -146,6 +146,9 @@ static ssize_t show_freqdomain_cpus(stru {struct acpi_cpufreq_data *data =per_cpu (acfreq_data, policy->cpu); +if (unlikely (!data)) +return -ENODEV ; +return cpufreq_show_cpus (data->freqdomain_cpus, buf); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.2/cpufreq-acpi_cpufreq-prevent-crash-on-reading-freqdomain_cpus.patch