Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4a16bea authored by Eric Dumazet's avatar Eric Dumazet Committed by Robert Richter
Browse files

oprofile: fix an overflow in ppro code



reset_value was changed from long to u64 in commit
b9917028 (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: default avatarEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
parent 9bf1a244
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;