Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80260
b: refs/heads/master
c: e9d4efd
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Jan 30, 2008
1 parent 56fb7d3 commit 1c63fcb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc850d6b374fffd08336996f4b4d3bbd6bf427f6
refs/heads/master: e9d4efddbec3d852d435b370b9c40ff7ac24afe6
44 changes: 20 additions & 24 deletions trunk/arch/x86/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,36 +118,32 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
unsigned long *stack, unsigned long bp,
const struct stacktrace_ops *ops, void *data)
{
#ifdef CONFIG_FRAME_POINTER
struct stack_frame *frame = (struct stack_frame *)bp;
while (valid_stack_ptr(tinfo, frame, sizeof(*frame))) {
struct stack_frame *next;
unsigned long addr;

addr = frame->return_address;
if (__kernel_text_address(addr))
ops->address(data, addr, 1);
/*
* break out of recursive entries (such as
* end_of_stack_stop_unwind_function). Also,
* we can never allow a frame pointer to
* move downwards!
*/
next = frame->next_frame;
bp = (unsigned long) next;
if (next <= frame)
break;
frame = next;
}
#else
/*
* if EBP is "deeper" into the stack than the actual stack pointer,
* we need to rewind the stack pointer a little to start at the
* first stack frame, but only if EBP is in this stack frame.
*/
if (stack > (unsigned long *) bp
&& valid_stack_ptr(tinfo, frame, sizeof(*frame)))
stack = (unsigned long *) bp;

while (valid_stack_ptr(tinfo, stack, sizeof(*stack))) {
unsigned long addr;

addr = *stack++;
if (__kernel_text_address(addr))
ops->address(data, addr, 1);
addr = *stack;
if (__kernel_text_address(addr)) {
if ((unsigned long) stack == bp + 4) {
ops->address(data, addr, 1);
frame = frame->next_frame;
bp = (unsigned long) frame;
} else {
ops->address(data, addr, 0);
}
}
stack++;
}
#endif
return bp;
}

Expand Down

0 comments on commit 1c63fcb

Please sign in to comment.