summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-04-27 21:09:50 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-04-27 21:09:50 +0000
commit7932a40e55d1ae730ec807e0e56a1fc201992f16 (patch)
tree5da6b502202a66b25ade6f645282d28c03e54069 /sys/arch
parenta0cf7bdb14281fc63c965bd384018436dfbb0508 (diff)
Avoid null-pointer dereference by giving proc0 a place to store its
floating-point registers. Pointed out by Nick Hudson. ok miod@, jsing@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/hppa/machdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index d3e576d48db..336c29a3b04 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.181 2010/04/19 14:05:04 jsing Exp $ */
+/* $OpenBSD: machdep.c,v 1.182 2010/04/27 21:09:49 kettenis Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -162,6 +162,7 @@ struct user *proc0paddr;
long mem_ex_storage[EXTENT_FIXED_STORAGE_SIZE(64) / sizeof(long)];
struct extent *hppa_ex;
struct pool hppa_fppl;
+struct fpreg proc0fpregs;
struct vm_map *exec_map = NULL;
struct vm_map *phys_map = NULL;
@@ -407,6 +408,7 @@ hppa_init(start)
ficacheall();
fdcacheall();
+ proc0paddr->u_pcb.pcb_fpregs = &proc0fpregs;
pool_init(&hppa_fppl, sizeof(struct fpreg), 16, 0, 0, "hppafp", NULL);
}