]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r264392 (davide):
authordelphij <delphij@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 10 Jan 2015 01:01:12 +0000 (01:01 +0000)
committerdelphij <delphij@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 10 Jan 2015 01:01:12 +0000 (01:01 +0000)
commitda6370a5829dc1bc00c64d4b7303e711a7b30d4d
tree0851c5f443f323039d4fb038eda297d81fee5e7b
parentfb00014650738b26ab7add62b8fe83a36160d89f
MFC r264392 (davide):

Fix a panic in zfs_rename().
this is due to a wrong dereference of a vnode when it's not locked and
can be (potentially) recycled. 'sdvp' cannot be locked on zfs_rename()
entry point because the VFS can't be sure that this scenario is
LOR-free (it might violate the parent->child lock acquisition rule).
Dereference 'tdvp' instead, which is already locked on entry, and access
'sdvp' fields only when it's safe, i.e. under ZFS_ENTER scope.

While at it, remove the usage of VOP_REALVP, as long as this is a NOP
on FreeBSD.

git-svn-id: svn://svn.freebsd.org/base/stable/10@276899 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c