x86/kernel: Use kstack_end() in dumpstack_64.c
authorAdrien Schildknecht <adrien+dev@schischi.me>
Sun, 22 Feb 2015 15:23:58 +0000 (16:23 +0100)
committerBorislav Petkov <bp@suse.de>
Mon, 23 Feb 2015 17:37:13 +0000 (18:37 +0100)
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 <mingo@kernel.org>
Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: c: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1424618638-6375-1-git-send-email-adrien+dev@schischi.me
Signed-off-by: Borislav Petkov <bp@suse.de>
arch/x86/kernel/dumpstack_64.c

index 553573bcf0ee3556f7a57b58ada193cce1516611..5f1c6266eb3028579f5036161dc240387dcb124f 100644 (file)
@@ -280,7 +280,7 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
                                pr_cont(" <EOI> ");
                        }
                } else {
-               if (((long) stack & (THREAD_SIZE-1)) == 0)
+               if (kstack_end(stack))
                        break;
                }
                if ((i % STACKSLOTS_PER_LINE) == 0) {