Page MenuHomeFreeBSD

Add PD_KILL option to prison_deref()
ClosedPublic

Authored by jamie on Feb 3 2021, 9:43 PM.
Tags
None
Referenced Files
F107089200: D28473.id84343.diff
Thu, Jan 9, 10:46 PM
Unknown Object (File)
Sun, Jan 5, 8:11 PM
Unknown Object (File)
Mon, Dec 30, 3:43 PM
Unknown Object (File)
Nov 13 2024, 7:14 PM
Unknown Object (File)
Nov 11 2024, 11:34 PM
Unknown Object (File)
Nov 11 2024, 11:03 PM
Unknown Object (File)
Nov 10 2024, 6:51 AM
Unknown Object (File)
Nov 3 2024, 9:28 PM
Subscribers

Details

Summary

Add the PD_KILL flag that instruction prison_deref() to take steps to actively kill a prison, namely clearing its PR_PERSIST flag and killing any attached processes.

This replaces a similar loop in sys_jail_remove(), bringing the operation under the same single hold on allprison_lock that it already has. It also replaces a bit of one-off code in kern_jail_set() to handle the destruction of almost-finished prisons.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jamie requested review of this revision.Feb 3 2021, 9:43 PM
jamie created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Feb 22 2021, 8:28 PM
This revision was automatically updated to reflect the committed changes.

After this commit running cd /usr/tests/lib/libc/sys && kyua test cpuset_test renders the entire system unusable (and in Jenkins it's triggering a kernel panic)

Sorry I took so long - I confused your note that it should be reverted with a note that it *had been* reverted.