aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-07-20 13:39:27 +0200
committerRichard Weinberger <richard@nod.at>2014-07-20 13:39:27 +0200
commitbb6a1b2e189f797c0e4a116aec7ce77c344f11e0 (patch)
treebb08672a820d4637be57d09cb6cf814b16c4da1f
parent468f65976a8d065ee1f27782337f4ee85a9151c5 (diff)
downloadlinux-stericsson-bb6a1b2e189f797c0e4a116aec7ce77c344f11e0.tar.gz
um: segv: Save regs only in case of a kernel mode fault
...otherwise me lose user mode regs and the resulting stack trace is useless. Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--arch/um/kernel/trap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index 974b87474a99..5678c3571e7c 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -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)) {