mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
To avoid LOR, always drop the filedesc lock before exporting fd to sbuf.
Reviewed by: kib MFC after: 3 days
This commit is contained in:
parent
9942898697
commit
bd973910c8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=252313
|
@ -3427,11 +3427,9 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *sb, ssize_t maxlen)
|
|||
* re-validate and re-evaluate its properties when
|
||||
* the loop continues.
|
||||
*/
|
||||
if (type == KF_TYPE_VNODE || type == KF_TYPE_FIFO)
|
||||
FILEDESC_SUNLOCK(fdp);
|
||||
error = export_fd_to_sb(data, type, i, fflags, refcnt,
|
||||
offset, fd_cap_rights, kif, sb, &remainder);
|
||||
if (type == KF_TYPE_VNODE || type == KF_TYPE_FIFO)
|
||||
FILEDESC_SLOCK(fdp);
|
||||
if (error)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue