From bfae4c94ef697e12f580eb16bc6329b7006301ea Mon Sep 17 00:00:00 2001 From: drochner Date: Wed, 10 Dec 2003 18:13:32 +0000 Subject: [PATCH] if the code segment is not enlarged, return 0 in pmap_exec_fixup so that the trap is not retried (fixes cases where a program traps for good reasons) --- sys/arch/i386/i386/pmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c index 9fed0e7ad635..6ce024de60dc 100644 --- a/sys/arch/i386/i386/pmap.c +++ b/sys/arch/i386/i386/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.165 2003/12/10 13:59:48 drochner Exp $ */ +/* $NetBSD: pmap.c,v 1.166 2003/12/10 18:13:32 drochner Exp $ */ /* * @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.165 2003/12/10 13:59:48 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.166 2003/12/10 18:13:32 drochner Exp $"); #include "opt_cputype.h" #include "opt_user_ldt.h" @@ -777,6 +777,7 @@ pmap_exec_fixup(struct vm_map *map, struct trapframe *tf, struct pcb *pcb) pcb->pcb_cs = tf->tf_cs = GSEL(GUCODEBIG_SEL, SEL_UPL); } else { pcb->pcb_cs = tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL); + return (0); } return (1); }