summaryrefslogtreecommitdiff
path: root/arch/powerpc/perf/callchain.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/perf/callchain.c')
-rw-r--r--arch/powerpc/perf/callchain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c
index 2396dda282cd..ead55351b254 100644
--- a/arch/powerpc/perf/callchain.c
+++ b/arch/powerpc/perf/callchain.c
@@ -243,7 +243,7 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry,
sp = regs->gpr[1];
perf_callchain_store(entry, next_ip);
- for (;;) {
+ while (entry->nr < PERF_MAX_STACK_DEPTH) {
fp = (unsigned long __user *) sp;
if (!valid_user_sp(sp, 1) || read_user_stack_64(fp, &next_sp))
return;