aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-07-20 07:39:27 -0400
committerRichard Weinberger <richard@nod.at>2014-07-20 07:39:27 -0400
commitbb6a1b2e189f797c0e4a116aec7ce77c344f11e0 (patch)
treebb08672a820d4637be57d09cb6cf814b16c4da1f /arch/um/kernel
parent468f65976a8d065ee1f27782337f4ee85a9151c5 (diff)
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>
Diffstat (limited to 'arch/um/kernel')
-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,
206 int is_write = FAULT_WRITE(fi); 206 int is_write = FAULT_WRITE(fi);
207 unsigned long address = FAULT_ADDRESS(fi); 207 unsigned long address = FAULT_ADDRESS(fi);
208 208
209 if (regs) 209 if (!is_user && regs)
210 current->thread.segv_regs = container_of(regs, struct pt_regs, regs); 210 current->thread.segv_regs = container_of(regs, struct pt_regs, regs);
211 211
212 if (!is_user && (address >= start_vm) && (address < end_vm)) { 212 if (!is_user && (address >= start_vm) && (address < end_vm)) {