aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2008-11-10 03:05:37 -0500
committerRobert Richter <robert.richter@amd.com>2008-11-17 12:47:36 -0500
commita4a16beadea041ab601e65b264b568e8b6b4f68d (patch)
tree44de0ad9b25cf1eb4f23f7f0fae4125955ec2990 /arch/x86
parent9bf1a2445f3c569098b8de7097ca324e65abecc2 (diff)
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>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/oprofile/op_model_ppro.c2
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 3f1b81a83e2e..716d26f0e5d4 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)
69 int i; 69 int i;
70 70
71 if (!reset_value) { 71 if (!reset_value) {
72 reset_value = kmalloc(sizeof(unsigned) * num_counters, 72 reset_value = kmalloc(sizeof(reset_value[0]) * num_counters,
73 GFP_ATOMIC); 73 GFP_ATOMIC);
74 if (!reset_value) 74 if (!reset_value)
75 return; 75 return;