Commit bb6a1b2e authored by Richard Weinberger's avatar Richard Weinberger

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: default avatarRichard Weinberger <richard@nod.at>
parent 468f6597
...@@ -206,7 +206,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, ...@@ -206,7 +206,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
int is_write = FAULT_WRITE(fi); int is_write = FAULT_WRITE(fi);
unsigned long address = FAULT_ADDRESS(fi); unsigned long address = FAULT_ADDRESS(fi);
if (regs) if (!is_user && regs)
current->thread.segv_regs = container_of(regs, struct pt_regs, regs); current->thread.segv_regs = container_of(regs, struct pt_regs, regs);
if (!is_user && (address >= start_vm) && (address < end_vm)) { if (!is_user && (address >= start_vm) && (address < end_vm)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment