Fix a lock order reversal. Unlock the proc before calling fget().
Reported by: kris
This commit is contained in:
parent
581ff5e326
commit
c6004a6202
@ -126,8 +126,8 @@ linux_open(struct thread *td, struct linux_open_args *args)
|
||||
SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
|
||||
struct file *fp;
|
||||
|
||||
error = fget(td, td->td_retval[0], &fp);
|
||||
PROC_UNLOCK(p);
|
||||
error = fget(td, td->td_retval[0], &fp);
|
||||
if (!error) {
|
||||
if (fp->f_type == DTYPE_VNODE)
|
||||
fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, td->td_ucred,
|
||||
|
Loading…
x
Reference in New Issue
Block a user