Skip to content

Commit

Permalink
um: segv: Save regs only in case of a kernel mode fault
Browse files Browse the repository at this point in the history
...otherwise me lose user mode regs and the resulting
stack trace is useless.

Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Richard Weinberger committed Jul 20, 2014
1 parent 468f659 commit bb6a1b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/um/kernel/trap.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
int is_write = FAULT_WRITE(fi);
unsigned long address = FAULT_ADDRESS(fi);

if (regs)
if (!is_user && regs)
current->thread.segv_regs = container_of(regs, struct pt_regs, regs);

if (!is_user && (address >= start_vm) && (address < end_vm)) {
Expand Down

0 comments on commit bb6a1b2

Please sign in to comment.