diff options
author | jhb <jhb@FreeBSD.org> | 2003-04-23 18:13:26 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-04-23 18:13:26 +0000 |
commit | 3df03e83166dcc7271c926fb3323d633ffdc6209 (patch) | |
tree | b80dfe7b8c5d58cf9623b6d31a08d149e10d7d75 /sys/compat/linux/linux_file.c | |
parent | 97c8ef8dd1d7307b37ba7dbbddbe77f4ecebf77b (diff) | |
download | FreeBSD-src-3df03e83166dcc7271c926fb3323d633ffdc6209.zip FreeBSD-src-3df03e83166dcc7271c926fb3323d633ffdc6209.tar.gz |
Fix a lock order reversal. Unlock the proc before calling fget().
Reported by: kris
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r-- | sys/compat/linux/linux_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 2eea67b..5736bc3 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -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, |