Module Name:    src
Committed By:   thorpej
Date:           Sat May  1 13:23:07 UTC 2021

Modified Files:
        src/sys/arch/alpha/include: userret.h

Log Message:
Make sure preemption is disabled around PMAP_USERRET(); it uses
per-cpu information.

XXX mi_userret() also internally disables preemption.  Should restructure
these to remove redundancies.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/include/userret.h

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/alpha/include/userret.h
diff -u src/sys/arch/alpha/include/userret.h:1.10 src/sys/arch/alpha/include/userret.h:1.11
--- src/sys/arch/alpha/include/userret.h:1.10	Mon Feb  6 02:14:13 2012
+++ src/sys/arch/alpha/include/userret.h	Sat May  1 13:23:07 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: userret.h,v 1.10 2012/02/06 02:14:13 matt Exp $ */
+/* $NetBSD: userret.h,v 1.11 2021/05/01 13:23:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -103,7 +103,9 @@ userret(struct lwp *l)
 	struct proc *p = l->l_proc;
 
 	/* Do any deferred user pmap operations. */
+	KPREEMPT_DISABLE(l);
 	PMAP_USERRET(vm_map_pmap(&p->p_vmspace->vm_map));
+	KPREEMPT_ENABLE(l);
 
 	/* Invoke MI userret code */
 	mi_userret(l);

Reply via email to