jail: Fix locking on an early jail_set error.
I had locked allprison_lock without immediately setting PD_LIST_LOCKED.
This commit is contained in:
parent
1fc928770b
commit
108a9384e9
@ -998,13 +998,13 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
|
||||
jid = 0;
|
||||
}
|
||||
sx_xlock(&allprison_lock);
|
||||
drflags = PD_LIST_XLOCKED;
|
||||
ppr = mypr;
|
||||
if (!prison_isalive(ppr)) {
|
||||
/* This jail is dying. This process will surely follow. */
|
||||
error = EAGAIN;
|
||||
goto done_deref;
|
||||
}
|
||||
drflags = PD_LIST_XLOCKED;
|
||||
if (jid != 0) {
|
||||
if (jid < 0) {
|
||||
error = EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user