aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Gritton <jamie@FreeBSD.org>2021-02-22 23:51:10 +0000
committerJamie Gritton <jamie@FreeBSD.org>2021-02-22 23:51:10 +0000
commit701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67 (patch)
tree9fb479bfeaaa11ad35a5dec90be8aa9a49c15c96
parent596417283722ee62ed17aed1c875ad90c01cbb0e (diff)
downloadsrc-701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67.tar.gz
src-701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67.zip
jail: Fix a LOR introduced in 1158508a8086
-rw-r--r--sys/kern/kern_jail.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 01724e41955c..89dd039685a8 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -1851,6 +1851,10 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
#ifdef RACCT
if (racct_enable && !created) {
+ if (drflags & PD_LOCKED) {
+ mtx_unlock(&pr->pr_mtx);
+ drflags &= ~PD_LOCKED;
+ }
if (drflags & PD_LIST_XLOCKED) {
sx_xunlock(&allprison_lock);
drflags &= ~PD_LIST_XLOCKED;