Module Name:    src
Committed By:   rmind
Date:           Wed Jul 29 17:14:38 UTC 2009

Modified Files:
        src/sys/arch/amd64/amd64: trap.c

Log Message:
T_ASTFLT|T_USER: check for LP_OWEUPC in l_lpflag, not l_flag.  Also, flag
unset was on p->p_flag.  Luckily, it did not corrupt the p_flag, because
we don't have LW_ flag matching LP_OWEUPC.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/amd64/amd64/trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/trap.c
diff -u src/sys/arch/amd64/amd64/trap.c:1.57 src/sys/arch/amd64/amd64/trap.c:1.58
--- src/sys/arch/amd64/amd64/trap.c:1.57	Thu Jul 16 14:21:12 2009
+++ src/sys/arch/amd64/amd64/trap.c	Wed Jul 29 17:14:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.57 2009/07/16 14:21:12 christos Exp $	*/
+/*	$NetBSD: trap.c,v 1.58 2009/07/29 17:14:38 rmind Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.57 2009/07/16 14:21:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.58 2009/07/29 17:14:38 rmind Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -400,10 +400,11 @@
 	case T_ARITHTRAP|T_USER:
 	case T_XMM|T_USER:
 		/* Already handled by fputrap(), fall through. */
-	case T_ASTFLT|T_USER:		/* Allow process switch */
+	case T_ASTFLT|T_USER:
+		/* Allow process switch. */
 		uvmexp.softs++;
-		if (l->l_flag & LP_OWEUPC) {
-			p->p_flag &= ~LP_OWEUPC;
+		if (l->l_pflag & LP_OWEUPC) {
+			l->l_pflag &= ~LP_OWEUPC;
 			ADDUPROF(l);
 		}
 		/* Allow a forced task switch. */

Reply via email to