Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOP_RENAME fixes for FreeBSD #12717

Merged
merged 1 commit into from
Nov 19, 2021
Merged

VOP_RENAME fixes for FreeBSD #12717

merged 1 commit into from
Nov 19, 2021

Commits on Nov 19, 2021

  1. Fix several bugs in the FreeBSD rename VOP implementation

    - To avoid a use-after-free, zfsvfs->z_log needs to be loaded after the
      teardown lock is acquired with ZFS_ENTER().
    - Avoid leaking vnode locks in zfs_rename_relock() and zfs_rename_()
      when the ZFS_ENTER() macros forces an early return.
    
    Refactor the rename implementation so that ZFS_ENTER() can be used
    safely.  As a bonus, this lets us use the ZFS_VERIFY_ZP() macro instead
    of open-coding its implementation.
    
    Reported-by: Peter Holm <[email protected]>
    Tested-by: Peter Holm <[email protected]>
    Signed-off-by: Mark Johnston <[email protected]>
    Sponsored-by: The FreeBSD Foundation
    markjdb committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    6be51b2 View commit details
    Browse the repository at this point in the history