diff options
author | 2021-01-11 18:51:09 +0000 | |
---|---|---|
committer | 2021-01-11 18:51:09 +0000 | |
commit | ac25e10f12215e6de86b4bd6cb68d6bc1d19a1f4 (patch) | |
tree | 667df972bd413a872d19aaedf336773cb605270d /sys | |
parent | New rw_obj_init() API providing reference-counted rwlock. (diff) | |
download | wireguard-openbsd-ac25e10f12215e6de86b4bd6cb68d6bc1d19a1f4.tar.xz wireguard-openbsd-ac25e10f12215e6de86b4bd6cb68d6bc1d19a1f4.zip |
Assert that the KERNEL_LOCK() is held in uao_set_swslot().
ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_aobj.c | 4 |
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) |