Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb6a1b2e authored by Richard Weinberger's avatar Richard Weinberger
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {