zfs/module
Mark Johnston 57f43735ca 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 <pho@FreeBSD.org>
Tested-by: Peter Holm <pho@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Sponsored-by: The FreeBSD Foundation
Closes #12717
2021-12-13 11:56:03 -08:00
..
avl Links in Source Files 2020-09-03 16:17:18 -07:00
icp Extending FreeBSD UIO Struct 2021-11-12 16:31:55 -08:00
lua Use fallthrough macro 2021-11-12 15:24:36 -08:00
nvpair Update `checkstyle` workflow env to ubuntu-20.04 2021-11-12 16:31:55 -08:00
os Fix several bugs in the FreeBSD rename VOP implementation 2021-12-13 11:56:03 -08:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Update `checkstyle` workflow env to ubuntu-20.04 2021-11-12 16:31:55 -08:00
zcommon Fix AVX512BW Fletcher code on AVX512-but-not-BW machines 2021-06-23 13:22:14 -07:00
zfs ZFS send/recv with ashift 9->12 leads to data corruption 2021-12-07 17:03:17 -08:00
zstd Linux 5.16: Resolve ZSTD_isError symbol collision in Linux kernel 2021-12-07 13:15:12 -08:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd Restore FreeBSD resource usage accounting 2021-03-05 12:50:32 -08:00
Makefile.in Update `checkstyle` workflow env to ubuntu-20.04 2021-11-12 16:31:55 -08:00