HomeFreeBSD

jail: Handle jail removal in a dedicated thread

Description

jail: Handle jail removal in a dedicated thread

Otherwise a deadlock is possible: the system taskqueue thread removes a
prison and calls vnet_destroy(), vnet_vlan_uninit() destroys the if_vlan
cloner, the vlan_clone_destroy() callback calls taskqueue_drain() on the
thread taskqueue.

Fix the problem by introducing a new thread for jail removals.

Ideally, the taskqueue interface would let consumers define queues
without having to map them to threads, as that'd make it possible to
avoid such deadlocks without extra threads; for now, this is the only
solution.

Reviewed by: jamie
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D47991

Details

Provenance
markjAuthored on Sat, Dec 21, 7:23 PM
Reviewer
jamie
Differential Revision
D47991: jail: Handle jail removal in a dedicated thread
Parents
rG9efd215411bb: rtwn: create a new HAL routine for enabling STA mode beacon processing
Branches
Unknown
Tags
Unknown