diff options
author | Richard Weinberger <richard@nod.at> | 2014-07-20 07:39:27 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2014-07-20 07:39:27 -0400 |
commit | bb6a1b2e189f797c0e4a116aec7ce77c344f11e0 (patch) | |
tree | bb08672a820d4637be57d09cb6cf814b16c4da1f /arch/um/kernel | |
parent | 468f65976a8d065ee1f27782337f4ee85a9151c5 (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.c | 2 |
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)) { |