git: 701d6b50ae7b - main - jail: Fix a LOR introduced in 1158508a8086

Jamie Gritton jamie at FreeBSD.org
Mon Feb 22 23:54:19 UTC 2021


The branch main has been updated by jamie:

URL: https://cgit.FreeBSD.org/src/commit/?id=701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67

commit 701d6b50ae7b0b2b50fbd191c2dbd646ef3b4a67
Author:     Jamie Gritton <jamie at FreeBSD.org>
AuthorDate: 2021-02-22 23:51:10 +0000
Commit:     Jamie Gritton <jamie at FreeBSD.org>
CommitDate: 2021-02-22 23:51:10 +0000

    jail: Fix a LOR introduced in 1158508a8086
---
 sys/kern/kern_jail.c | 4 ++++
 1 file changed, 4 insertions(+)

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;


More information about the dev-commits-src-main mailing list