mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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>
This commit is contained in:
parent
468f65976a
commit
bb6a1b2e18
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user