Thread (4 messages) flat view 4 messages, 2 authors, 2011-02-09

[PATCHv2] ARM: perf/oprofile: fix off-by-one in stack check

From: Will Deacon <hidden>
Date: 2011-02-09 10:10:42

Hi Rabin,
Since tail is the previous fp - 1, we need to compare the new fp with tail + 1
to ensure that we don't end up passing in the same tail again, in order to
avoid a potential infinite loop in the perf interrupt handler (which has been
observed to occur).  A similar fix seems to be needed in the OProfile code.

Signed-off-by: Rabin Vincent <redacted>
---
v2: refined check as per Will's comment

 arch/arm/kernel/perf_event.c |    2 +-
 arch/arm/oprofile/common.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Looks good, thanks.

Acked-by: Will Deacon <redacted>

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help