Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339116
b: refs/heads/master
c: 6c8d8b3
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt committed Nov 19, 2012
1 parent a918a88 commit ca6c2fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28696f434fef0efa97534b59986ad33b9c4df7f8
refs/heads/master: 6c8d8b3c69cef1330e0c5cbc2a8b9268024927a0
9 changes: 9 additions & 0 deletions trunk/arch/x86/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,15 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
{
if (unlikely(offset > MAX_REG_OFFSET))
return 0;
#ifdef CONFIG_X86_32
/*
* Traps from the kernel do not save sp and ss.
* Use the helper function to retrieve sp.
*/
if (offset == offsetof(struct pt_regs, sp) &&
regs->cs == __KERNEL_CS)
return kernel_stack_pointer(regs);
#endif
return *(unsigned long *)((unsigned long)regs + offset);
}

Expand Down

0 comments on commit ca6c2fc

Please sign in to comment.