+ x86-fix-oprofile-double-free-was-re-multiple-free-fix.patch added to -mm tree

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

 



The patch titled
     x86-fix-oprofile-double-free-was-re-multiple-free fix
has been added to the -mm tree.  Its filename is
     x86-fix-oprofile-double-free-was-re-multiple-free-fix.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: x86-fix-oprofile-double-free-was-re-multiple-free fix
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

The fix for the fix needed a fix: allocate_msrs() was using
for_each_online_cpu(), but nmi_setup uses for_each_possible_cpu(), and in
my test machine, a Dell Poweredge 1950 I have 2 dual core Xeons, which
makes for 4 possible cores, but wait, they are HT capable, so...

[acme@mica linux-2.6.21.3.orig]$ dmesg | grep Allowing
SMP: Allowing 8 CPUs, 4 hotplug CPUs
[acme@mica linux-2.6.21.3.orig]$

We have 8 possible CPUs, but only 4 online, b00m. Fix it by making
allocate_msrs agree with nmi_setup, i.e. make both use
for_each_possible_cpu().

Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Acked-by: Chris Wright <chrisw@xxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxx>
Cc: Chuck Ebbert <cebbert@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/i386/oprofile/nmi_int.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/oprofile/nmi_int.c~x86-fix-oprofile-double-free-was-re-multiple-free-fix arch/i386/oprofile/nmi_int.c
--- a/arch/i386/oprofile/nmi_int.c~x86-fix-oprofile-double-free-was-re-multiple-free-fix
+++ a/arch/i386/oprofile/nmi_int.c
@@ -154,7 +154,7 @@ static int allocate_msrs(void)
 	size_t counters_size = sizeof(struct op_msr) * model->num_counters;
 
 	int i;
-	for_each_online_cpu(i) {
+	for_each_possible_cpu(i) {
 		cpu_msrs[i].counters = kmalloc(counters_size, GFP_KERNEL);
 		if (!cpu_msrs[i].counters) {
 			success = 0;
_

Patches currently in -mm which might be from acme@xxxxxxxxxx are

x86-fix-oprofile-double-free-was-re-multiple-free-fix.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