Skip to content
Commit cbf5b73d authored by Eiichi Tsukata's avatar Eiichi Tsukata Committed by Thomas Gleixner
Browse files

x86/stacktrace: Prevent infinite loop in arch_stack_walk_user()

arch_stack_walk_user() checks `if (fp == frame.next_fp)` to prevent a
infinite loop by self reference but it's not enogh for circular reference.

Once a lack of return address is found, there is no point to continue the
loop, so break out.

Fixes: 02b67518

 ("tracing: add support for userspace stacktraces in tracing/iter_ctrl")
Signed-off-by: default avatarEiichi Tsukata <devel@etsukata.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Link: https://lkml.kernel.org/r/20190711023501.963-1-devel@etsukata.com
parent 7652ac92
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment