Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105303515
D47991.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
935 B
Referenced Files
None
Subscribers
None
D47991.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
@@ -130,6 +130,12 @@
unsigned new;
};
+/*
+ * Handle jail teardown in a dedicated thread to avoid deadlocks from
+ * vnet_destroy().
+ */
+TASKQUEUE_DEFINE_THREAD(jail_remove);
+
/* allprison, allprison_racct and lastprid are protected by allprison_lock. */
struct sx allprison_lock;
SX_SYSINIT(allprison_lock, &allprison_lock, "allprison");
@@ -2902,7 +2908,7 @@
* Don't remove the last reference in this context,
* in case there are locks held.
*/
- taskqueue_enqueue(taskqueue_thread, &pr->pr_task);
+ taskqueue_enqueue(taskqueue_jail_remove, &pr->pr_task);
}
}
@@ -2976,7 +2982,7 @@
pr->pr_id));
pr->pr_flags |= PR_COMPLETE_PROC;
mtx_unlock(&pr->pr_mtx);
- taskqueue_enqueue(taskqueue_thread, &pr->pr_task);
+ taskqueue_enqueue(taskqueue_jail_remove, &pr->pr_task);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 15, 4:55 PM (18 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15211150
Default Alt Text
D47991.diff (935 B)
Attached To
Mode
D47991: jail: Handle jail removal in a dedicated thread
Attached
Detach File
Event Timeline
Log In to Comment