From: Adrien Schildknecht Date: Sun, 22 Feb 2015 15:23:58 +0000 (+0100) Subject: x86/kernel: Use kstack_end() in dumpstack_64.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=04769ae3ac72f86324a189b69f53bf3bfb61acfd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git x86/kernel: Use kstack_end() in dumpstack_64.c i386 is already using kstack_end() in dumpstack_32.c. We should also use it to make the code clearer and unify the stack printing logic some more. Suggested-by: Ingo Molnar Signed-off-by: Adrien Schildknecht Acked-by: Steven Rostedt Cc: c: Linus Torvalds Link: http://lkml.kernel.org/r/1424618638-6375-1-git-send-email-adrien+dev@schischi.me Signed-off-by: Borislav Petkov --- diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 553573bcf0ee..5f1c6266eb30 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c @@ -280,7 +280,7 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, pr_cont(" "); } } else { - if (((long) stack & (THREAD_SIZE-1)) == 0) + if (kstack_end(stack)) break; } if ((i % STACKSLOTS_PER_LINE) == 0) {