mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
The temporary workaround for the call to the vget() without lock type in
the fdesc_allocvp(). The caller of the fdesc_allocvp() expects that the returned vnode is not reclaimed. Do lock the vnode exclusive and drop the lock after. Reported by: pho Reviewed by: jeff
This commit is contained in:
parent
85018ba57b
commit
8eb6b6ecb6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177910
@ -116,9 +116,11 @@ fdesc_allocvp(ftype, ix, mp, vpp, td)
|
||||
loop:
|
||||
LIST_FOREACH(fd, fc, fd_hash) {
|
||||
if (fd->fd_ix == ix && fd->fd_vnode->v_mount == mp) {
|
||||
if (vget(fd->fd_vnode, 0, td))
|
||||
if (vget(fd->fd_vnode, LK_EXCLUSIVE | LK_CANRECURSE,
|
||||
td))
|
||||
goto loop;
|
||||
*vpp = fd->fd_vnode;
|
||||
VOP_UNLOCK(*vpp, 0);
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user