Module Name: src
Committed By: skrll
Date: Wed Oct 29 10:56:19 UTC 2014
Modified Files:
src/sys/arch/arm/arm: ast.c
Log Message:
If our ASID got released and access via TTBR0 is disable make sure we
re-activate the lwp before calling mi_userret; otherwise bad things
happen, e.g. for signals.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/arm/ast.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/arm/arm/ast.c
diff -u src/sys/arch/arm/arm/ast.c:1.24 src/sys/arch/arm/arm/ast.c:1.25
--- src/sys/arch/arm/arm/ast.c:1.24 Wed Aug 13 21:41:32 2014
+++ src/sys/arch/arm/arm/ast.c Wed Oct 29 10:56:19 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ast.c,v 1.24 2014/08/13 21:41:32 matt Exp $ */
+/* $NetBSD: ast.c,v 1.25 2014/10/29 10:56:19 skrll Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.24 2014/08/13 21:41:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.25 2014/10/29 10:56:19 skrll Exp $");
#include "opt_ddb.h"
@@ -71,9 +71,6 @@ void ast(struct trapframe *);
void
userret(struct lwp *l)
{
- /* Invoke MI userret code */
- mi_userret(l);
-
#if defined(__PROG32) && defined(ARM_MMU_EXTENDED)
/*
* If our ASID got released, access via TTBR0 will have been disabled.
@@ -83,8 +80,12 @@ userret(struct lwp *l)
if (armreg_ttbcr_read() & TTBCR_S_PD0) {
pmap_activate(l);
}
+ KASSERT(!(armreg_ttbcr_read() & TTBCR_S_PD0));
#endif
+ /* Invoke MI userret code */
+ mi_userret(l);
+
#if defined(__PROG32) && defined(DIAGNOSTIC)
KASSERT(VALID_R15_PSR(lwp_trapframe(l)->tf_pc,
lwp_trapframe(l)->tf_spsr));