]> git.proxmox.com Git - mirror_zfs.git/commit
Linux: Defer loading the object set in zfs_setattr()
authorMark Johnston <markj@FreeBSD.org>
Tue, 9 Jan 2024 15:57:29 +0000 (10:57 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 12 Jan 2024 19:51:53 +0000 (11:51 -0800)
commitd8b2686603b6fcb7754b5852ad6824fb078c56a7
treeab736279a528bbe266d338aab1083752b270e35b
parenta382e21194c1690951d2eee8ebd98bc096f01c83
Linux: Defer loading the object set in zfs_setattr()

We need to wait until after having done a zfs_enter() to load some
fields from the zfsvfs structure.  Otherwise a use-after-free is
possible in the face of a concurrent rollback.

Other functions in this file are careful to avoid this bug, I believe
this is the only instance.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #15752
module/os/linux/zfs/zfs_vnops_os.c