Skip to content

Commit

Permalink
oprofile: fix an overflow in ppro code
Browse files Browse the repository at this point in the history
reset_value was changed from long to u64 in commit
b991702 (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>
  • Loading branch information
Eric Dumazet authored and Robert Richter committed Nov 17, 2008
1 parent 9bf1a24 commit a4a16be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/oprofile/op_model_ppro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a4a16be

Please sign in to comment.