summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r--sys/arch/m88k/m88k/mem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/m88k/m88k/mem.c b/sys/arch/m88k/m88k/mem.c
index 217d2394c8b..0157fd2a0e1 100644
--- a/sys/arch/m88k/m88k/mem.c
+++ b/sys/arch/m88k/m88k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.7 2024/06/23 22:08:37 kettenis Exp $ */
+/* $OpenBSD: mem.c,v 1.8 2024/10/28 10:18:03 mvs Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -46,6 +46,7 @@
#include <sys/systm.h>
#include <sys/uio.h>
#include <sys/malloc.h>
+#include <sys/atomic.h>
#include <machine/conf.h>
@@ -64,7 +65,8 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p)
switch (minor(dev)) {
case 0:
case 1:
- if (securelevel <= 0 || allowkmem)
+ if (atomic_load_int(&securelevel) <= 0 ||
+ atomic_load_int(&allowkmem))
break;
return (EPERM);
case 2: