Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Feb 2021 12:40:42 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: dde453cf7d3a - stable/13 - zfs: fix panics with invariant kernels from zfs_replay_setattr
Message-ID:  <202102011240.111Cegkr094823@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=dde453cf7d3a272ee9319ba6d9e27d34e6b6da6f

commit dde453cf7d3a272ee9319ba6d9e27d34e6b6da6f
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-01-25 21:28:05 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-02-01 12:39:16 +0000

    zfs: fix panics with invariant kernels from zfs_replay_setattr
    
    (cherry picked from commit f40d6217f20d69427b58d82ce4e29d88bf4dfbd6)
---
 sys/contrib/openzfs/module/zfs/zfs_replay.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/contrib/openzfs/module/zfs/zfs_replay.c b/sys/contrib/openzfs/module/zfs/zfs_replay.c
index cba5e8c9cd0b..53c7dbd5df43 100644
--- a/sys/contrib/openzfs/module/zfs/zfs_replay.c
+++ b/sys/contrib/openzfs/module/zfs/zfs_replay.c
@@ -859,7 +859,12 @@ zfs_replay_setattr(void *arg1, void *arg2, boolean_t byteswap)
 	zfsvfs->z_fuid_replay = zfs_replay_fuid_domain(start, &start,
 	    lr->lr_uid, lr->lr_gid);
 
+	/*
+	 * Satisfy assertions.
+	 */
+	vn_seqc_write_begin(ZTOV(zp));
 	error = zfs_setattr(zp, vap, 0, kcred);
+	vn_seqc_write_end(ZTOV(zp));
 
 	zfs_fuid_info_free(zfsvfs->z_fuid_replay);
 	zfsvfs->z_fuid_replay = NULL;



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