HomeFreeBSD

Fix a panic in zfs_rename().

Description

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.

Discussed with: avg
Reviewed by: pjd

Details

Provenance
davideAuthored on
Parents
rS264391: Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp from
Branches
Unknown
Tags
Unknown

Event Timeline