projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0616c1
)
perf: Fix off by one test in perf_reg_value()
author
Dan Carpenter
<
[email protected]
>
Wed, 5 Sep 2012 12:31:26 +0000
(15:31 +0300)
committer
Ingo Molnar
<
[email protected]
>
Wed, 19 Sep 2012 15:08:40 +0000
(17:08 +0200)
The test should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().
Signed-off-by: Dan Carpenter <
[email protected]
>
Acked-by: Jiri Olsa <
[email protected]
>
Acked-by: Peter Zijlstra <
[email protected]
>
Cc: Frederic Weisbecker <
[email protected]
>
Cc: Arnaldo Carvalho de Melo <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/perf_regs.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/perf_regs.c
b/arch/x86/kernel/perf_regs.c
index c5a3e5cfe07f3cc61997bcd44337f63fd8a43952..e309cc5c276eaf7b2a9fa01020f14007b166875f 100644
(file)
--- a/
arch/x86/kernel/perf_regs.c
+++ b/
arch/x86/kernel/perf_regs.c
@@
-57,7
+57,7
@@
static unsigned int pt_regs_offset[PERF_REG_X86_MAX] = {
u64 perf_reg_value(struct pt_regs *regs, int idx)
{
- if (WARN_ON_ONCE(idx > ARRAY_SIZE(pt_regs_offset)))
+ if (WARN_ON_ONCE(idx >
=
ARRAY_SIZE(pt_regs_offset)))
return 0;
return regs_get_register(regs, pt_regs_offset[idx]);