[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: oprofile: fix an overflow in ppro code
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2008-11-30 21:59:56
Message-ID: 200811302159.mAULxuAE001481 () hera ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a4a16beadea041ab601e65b264b568e8b6b4f68d
Commit: a4a16beadea041ab601e65b264b568e8b6b4f68d
Parent: 9bf1a2445f3c569098b8de7097ca324e65abecc2
Author: Eric Dumazet <dada1@cosmosbay.com>
AuthorDate: Mon Nov 10 09:05:37 2008 +0100
Committer: Robert Richter <robert.richter@amd.com>
CommitDate: Mon Nov 17 18:47:36 2008 +0100
oprofile: fix an overflow in ppro code
reset_value was changed from long to u64 in commit
b99170288421c79f0c2efa8b33e26e65f4bb7fb8 (oprofile: Implement Intel
architectural perfmon support)
But dynamic allocation of this array use a wrong type (long instead of
u64)
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
---
arch/x86/oprofile/op_model_ppro.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
index 3f1b81a..716d26f 100644
--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -69,7 +69,7 @@ static void ppro_setup_ctrs(struct op_msrs const * const msrs)
int i;
if (!reset_value) {
- reset_value = kmalloc(sizeof(unsigned) * num_counters,
+ reset_value = kmalloc(sizeof(reset_value[0]) * num_counters,
GFP_ATOMIC);
if (!reset_value)
return;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic