From aaf47270143ec16020a82c0e4ca612a008449cec Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 10 Jan 2023 11:18:47 +0000 Subject: [PATCH] The uvm_swap_data_lock mutex can now be taken without holding the kernel lock. So it needs IPL_MPFLOOR to prevent lock ordering issues. ok jca@ --- sys/uvm/uvm_swap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index 38f27cf5164..27963259eba 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.165 2022/10/11 11:46:58 jsg Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.166 2023/01/10 11:18:47 kettenis Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -215,7 +215,7 @@ LIST_HEAD(swap_priority, swappri); struct swap_priority swap_priority; /* [S] */ /* locks */ -struct mutex uvm_swap_data_lock = MUTEX_INITIALIZER(IPL_NONE); +struct mutex uvm_swap_data_lock = MUTEX_INITIALIZER(IPL_MPFLOOR); struct rwlock swap_syscall_lock = RWLOCK_INITIALIZER("swplk"); struct mutex oommtx = MUTEX_INITIALIZER(IPL_VM); -- 2.20.1