[merged] drivers-cpufreq-pcc-cpufreqc-avoid-null-pointer-dereference.patch removed from -mm tree

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

 



The patch titled
     drivers/cpufreq/pcc-cpufreq.c: avoid NULL pointer dereference
has been removed from the -mm tree.  Its filename was
     drivers-cpufreq-pcc-cpufreqc-avoid-null-pointer-dereference.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: drivers/cpufreq/pcc-cpufreq.c: avoid NULL pointer dereference
From: Naga Chumbalkar <nagananda.chumbalkar@xxxxxx>

per_cpu(processors, n) can be NULL.

Loading CPUFreq modules[  437.661360] BUG: unable to handle kernel NULL pointer
dereference at (null)
IP: [<ffffffffa0434314>] pcc_cpufreq_cpu_init+0x74/0x220 [pcc_cpufreq]

It's better to avoid the oops by failing the driver, and allowing the
system to boot.

Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@xxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/cpufreq/pcc-cpufreq.c |    3 +++
 1 file changed, 3 insertions(+)

diff -puN drivers/cpufreq/pcc-cpufreq.c~drivers-cpufreq-pcc-cpufreqc-avoid-null-pointer-dereference drivers/cpufreq/pcc-cpufreq.c
--- a/drivers/cpufreq/pcc-cpufreq.c~drivers-cpufreq-pcc-cpufreqc-avoid-null-pointer-dereference
+++ a/drivers/cpufreq/pcc-cpufreq.c
@@ -261,6 +261,9 @@ static int pcc_get_offset(int cpu)
 	pr = per_cpu(processors, cpu);
 	pcc_cpu_data = per_cpu_ptr(pcc_cpu_info, cpu);
 
+	if (!pr)
+		return -ENODEV;
+
 	status = acpi_evaluate_object(pr->handle, "PCCP", NULL, &buffer);
 	if (ACPI_FAILURE(status))
 		return -ENODEV;
_

Patches currently in -mm which might be from nagananda.chumbalkar@xxxxxx are

origin.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux