svn commit: r304622 - head/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Mon Aug 22 18:19:48 UTC 2016
Author: andrew
Date: Mon Aug 22 18:19:46 2016
New Revision: 304622
URL: https://svnweb.freebsd.org/changeset/base/304622
Log:
Ensure map is valid, even before userland exists and the fault address
register points to an address in the userland range.
Obtained from: ABT Systems Ltd
MFC after: 1 week
Sponsored by: the FreeBSD Foundation
Modified:
head/sys/arm64/arm64/trap.c
Modified: head/sys/arm64/arm64/trap.c
==============================================================================
--- head/sys/arm64/arm64/trap.c Mon Aug 22 18:17:29 2016 (r304621)
+++ head/sys/arm64/arm64/trap.c Mon Aug 22 18:19:46 2016 (r304622)
@@ -184,10 +184,13 @@ data_abort(struct trapframe *frame, uint
map = &p->p_vmspace->vm_map;
else {
/* The top bit tells us which range to use */
- if ((far >> 63) == 1)
+ if ((far >> 63) == 1) {
map = kernel_map;
- else
+ } else {
map = &p->p_vmspace->vm_map;
+ if (map == NULL)
+ map = kernel_map;
+ }
}
if (pmap_fault(map->pmap, esr, far) == KERN_SUCCESS)
More information about the svn-src-head
mailing list