Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176595348
D60833.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60833.id.diff
View Options
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -2073,6 +2073,13 @@
}
maybe_changed = true;
+ /*
+ * Any errors past this point will need to de-persist newly created
+ * prisons, as well as call remove methods.
+ */
+ if (created)
+ drflags |= PD_KILL;
+
/* Set the parameters of the prison. */
#ifdef INET
redo_ip4 = false;
@@ -2244,13 +2251,6 @@
#endif
mtx_unlock(&pr->pr_mtx);
drflags &= ~PD_LOCKED;
- /*
- * Any errors past this point will need to de-persist newly created
- * prisons, as well as call remove methods.
- */
- if (created)
- drflags |= PD_KILL;
-
#ifdef RACCT
if (racct_enable && created)
prison_racct_attach(pr);
@@ -3693,7 +3693,7 @@
/* Kill the prison and its descendents. */
KASSERT(pr != &prison0,
("prison_deref trying to kill prison0"));
- if (!prison_isalive(pr)) {
+ if (pr->pr_state == PRISON_STATE_DYING) {
/* Silently ignore already-dying prisons. */
flags &= ~PD_KILL;
} else {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 21, 2:35 AM (7 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41035601
Default Alt Text
D60833.id.diff (1 KB)
Attached To
Mode
D60833: jail: fix leaked persistent prisons on failed jail_set(2) create
Attached
Detach File
Event Timeline
Log In to Comment