Module Name:    src
Committed By:   ad
Date:           Tue Dec  3 12:42:21 UTC 2019

Modified Files:
        src/sys/arch/sh3/sh3: exception.c

Log Message:
One more tweak.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sh3/sh3/exception.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/sh3/sh3/exception.c
diff -u src/sys/arch/sh3/sh3/exception.c:1.72 src/sys/arch/sh3/sh3/exception.c:1.73
--- src/sys/arch/sh3/sh3/exception.c:1.72	Tue Dec  3 12:39:00 2019
+++ src/sys/arch/sh3/sh3/exception.c	Tue Dec  3 12:42:21 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: exception.c,v 1.72 2019/12/03 12:39:00 ad Exp $	*/
+/*	$NetBSD: exception.c,v 1.73 2019/12/03 12:42:21 ad Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2019 The NetBSD Foundation, Inc. All rights reserved.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.72 2019/12/03 12:39:00 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.73 2019/12/03 12:42:21 ad Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -378,7 +378,8 @@ tlb_exception(struct lwp *l, struct trap
 
 	/* Page not found. call fault handler */
 	splx(tf->tf_ssr & PSL_IMASK);
-	LWP_CACHE_CREDS(l, l->l_proc);
+	if (usermode)
+		LWP_CACHE_CREDS(l, l->l_proc);
 	pcb->pcb_onfault = NULL;
 	err = uvm_fault(map, va, ftype);
 	pcb->pcb_onfault = onfault;

Reply via email to