]> git.baikalelectronics.ru Git - kernel.git/commit
perf/rapl: Fix crash in rapl_scale()
authorStephane Eranian <eranian@google.com>
Thu, 22 Jan 2015 20:38:34 +0000 (21:38 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 28 Jan 2015 12:04:35 +0000 (13:04 +0100)
commite69f8a714d46cafe9c4a6f56c86985c830759b62
tree362a1c9e4f888654d04b6b6ea8b5f0efa0492d22
parent318d13352900a059d6d4cc35a994c1c24d69ff32
perf/rapl: Fix crash in rapl_scale()

This patch fixes a systematic crash in rapl_scale()
due to an invalid pointer.

The bug was introduced by commit:

  390d302f1354 ("x86: Replace __get_cpu_var uses")

The fix is simple. Just put the parenthesis where it needs
to be, i.e., around rapl_pmu. To my surprise, the compiler
was not complaining about passing an integer instead of a
pointer.

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Fixes: 390d302f1354 ("x86: Replace __get_cpu_var uses")
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: cl@linux.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20150122203834.GA10228@thinkpad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_intel_rapl.c