diff options
-rw-r--r-- | arch/arm/kernel/perf_event.c | 2 | ||||
-rw-r--r-- | arch/arm/oprofile/common.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 5efa2647a2fb..d150ad1ccb5d 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -700,7 +700,7 @@ user_backtrace(struct frame_tail __user *tail, | |||
700 | * Frame pointers should strictly progress back up the stack | 700 | * Frame pointers should strictly progress back up the stack |
701 | * (towards higher addresses). | 701 | * (towards higher addresses). |
702 | */ | 702 | */ |
703 | if (tail >= buftail.fp) | 703 | if (tail + 1 >= buftail.fp) |
704 | return NULL; | 704 | return NULL; |
705 | 705 | ||
706 | return buftail.fp - 1; | 706 | return buftail.fp - 1; |
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 8aa974491dfc..6adda2b5fa31 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
@@ -85,7 +85,7 @@ static struct frame_tail* user_backtrace(struct frame_tail *tail) | |||
85 | 85 | ||
86 | /* frame pointers should strictly progress back up the stack | 86 | /* frame pointers should strictly progress back up the stack |
87 | * (towards higher addresses) */ | 87 | * (towards higher addresses) */ |
88 | if (tail >= buftail[0].fp) | 88 | if (tail + 1 >= buftail[0].fp) |
89 | return NULL; | 89 | return NULL; |
90 | 90 | ||
91 | return buftail[0].fp-1; | 91 | return buftail[0].fp-1; |