Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2020 17:45:06 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r363484 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <202007241745.06OHj6ej086860@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Fri Jul 24 17:45:06 2020
New Revision: 363484
URL: https://svnweb.freebsd.org/changeset/base/363484

Log:
  MFC r362891:
  
  Fix page fault in zfsctl_snapdir_getattr
  
  Must acquire the z_teardown_lock before accessing the zfsvfs_t object. I
  can't reproduce this panic on demand, but this looks like the correct
  solution.
  
  PR:		247668
  Reviewed by:	avg
  Sponsored by:	Axcient
  Differential Revision:	https://reviews.freebsd.org/D25543

Modified:
  stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Fri Jul 24 17:34:44 2020	(r363483)
+++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Fri Jul 24 17:45:06 2020	(r363484)
@@ -1120,12 +1120,13 @@ zfsctl_snapdir_getattr(ap)
 	vnode_t *vp = ap->a_vp;
 	vattr_t *vap = ap->a_vap;
 	zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data;
-	dsl_dataset_t *ds = dmu_objset_ds(zfsvfs->z_os);
+	dsl_dataset_t *ds;
 	sfs_node_t *node = vp->v_data;
 	uint64_t snap_count;
 	int err;
 
 	ZFS_ENTER(zfsvfs);
+	ds = dmu_objset_ds(zfsvfs->z_os);
 	zfsctl_common_getattr(vp, vap);
 	vap->va_ctime = dmu_objset_snap_cmtime(zfsvfs->z_os);
 	vap->va_mtime = vap->va_ctime;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007241745.06OHj6ej086860>