]> git.hungrycats.org Git - linux/commit
[PATCH] Fix show_trace() in irq context with CONFIG_4KSTACKS
authorOleg Nesterov <oleg@tv-sign.ru>
Mon, 18 Oct 2004 16:02:14 +0000 (09:02 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 18 Oct 2004 16:02:14 +0000 (09:02 -0700)
commitc2634010e63ddba0efee4546b3f10f4d19acace2
tree8b2dbf34cc64f1dafbcc92ea6852f630d4c3e9a8
parente78a321619b295e6744a6eeb713d722781ef955e
[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>
arch/i386/kernel/traps.c