summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_aobj.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2021-01-11 18:51:10 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2021-01-11 18:51:10 +0000
commit33aefee6b1ff77a405d9bebe5b48b6dd4a195788 (patch)
tree6640a0f77389e5cb6c7cb1afffbdf0b3854cc23c /sys/uvm/uvm_aobj.c
parent59111c67ebdaabdccc351fa1c8d7954f70290fd5 (diff)
Assert that the KERNEL_LOCK() is held in uao_set_swslot().
ok kettenis@
Diffstat (limited to 'sys/uvm/uvm_aobj.c')
-rw-r--r--sys/uvm/uvm_aobj.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c
index ce0d2f7ccbd..5567ec9773a 100644
--- a/sys/uvm/uvm_aobj.c
+++ b/sys/uvm/uvm_aobj.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_aobj.c,v 1.89 2020/10/21 09:08:14 mpi Exp $ */
+/* $OpenBSD: uvm_aobj.c,v 1.90 2021/01/11 18:51:09 mpi Exp $ */
/* $NetBSD: uvm_aobj.c,v 1.39 2001/02/18 21:19:08 chs Exp $ */
/*
@@ -288,6 +288,8 @@ uao_set_swslot(struct uvm_object *uobj, int pageidx, int slot)
struct uvm_aobj *aobj = (struct uvm_aobj *)uobj;
int oldslot;
+ KERNEL_ASSERT_LOCKED();
+
/* if noswap flag is set, then we can't set a slot */
if (aobj->u_flags & UAO_FLAG_NOSWAP) {
if (slot == 0)