[PATCH] Fix show_trace() in irq context with CONFIG_4KSTACKS
- valid_stack_ptr() erroneously assumes that stack always lives in task_struct->thread_info. - the main loop in show_trace() does not recalc ebp after stack switching. With CONFIG_FRAME_POINTER every call to print_context_stack() will produce the same output. With this patch, show_trace() does not use task argument in the main loop. Instead, it converts stack to thread_info* context, and passes it to print_context_stack() and (implicitly) to valid_stack_ptr(). valid_stack_ptr() now does bounds checking against proper context. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment