From f3b5414816d1323fb952a52969123786b389a6c0 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 6 Sep 2019 12:22:02 +0000 Subject: If uvm_map_inentry returns false then a signal has been delivered, and userret() must be called on trap() exit to deliver it, rather than repeating the same cause infinitely. discovered by George Koehler ok kettenis bluhm visa --- sys/arch/amd64/amd64/trap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c index 31737f6706d..6ba0850f685 100644 --- a/sys/arch/amd64/amd64/trap.c +++ b/sys/arch/amd64/amd64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.76 2019/07/09 23:48:07 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.77 2019/09/06 12:22:01 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.2 2003/05/04 23:51:56 fvdl Exp $ */ /*- @@ -331,7 +331,7 @@ usertrap(struct trapframe *frame) if (!uvm_map_inentry(p, &p->p_spinentry, PROC_STACK(p), "[%s]%d/%d sp=%lx inside %lx-%lx: not MAP_STACK\n", uvm_map_inentry_sp, p->p_vmspace->vm_map.sserial)) - return; + goto out; switch (type) { case T_PROTFLT: /* protection fault */ -- cgit v1.2.3