From 8824a7f133e4402f7176115cf8efd535c8cbdab2 Mon Sep 17 00:00:00 2001 From: WHR Date: Sun, 14 Jan 2018 23:57:54 +0300 Subject: [PATCH] OpenZFS 8966 - Source file zfs_acl.c, function zfs_aclset_common contains a use after end of the lifetime of a local variable Authored by: WHR Reviewed by: Matt Ahrens Reviewed by: Andriy Gapon Reviewed by: George Melikov Reviewed by: Brian Behlendorf Approved by: Richard Lowe Ported-by: Giuseppe Di Natale OpenZFS-issue: https://www.illumos.org/issues/8966 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c95549fcdc Closes #7141 --- module/zfs/zfs_acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zfs_acl.c b/module/zfs/zfs_acl.c index 71a837a355..5ef20f0882 100644 --- a/module/zfs/zfs_acl.c +++ b/module/zfs/zfs_acl.c @@ -1323,6 +1323,7 @@ zfs_aclset_common(znode_t *zp, zfs_acl_t *aclp, cred_t *cr, dmu_tx_t *tx) sa_bulk_attr_t bulk[5]; uint64_t ctime[2]; int count = 0; + zfs_acl_phys_t acl_phys; mode = zp->z_mode; @@ -1369,7 +1370,6 @@ zfs_aclset_common(znode_t *zp, zfs_acl_t *aclp, cred_t *cr, dmu_tx_t *tx) } else { /* Painful legacy way */ zfs_acl_node_t *aclnode; uint64_t off = 0; - zfs_acl_phys_t acl_phys; uint64_t aoid; if ((error = sa_lookup(zp->z_sa_hdl, SA_ZPL_ZNODE_ACL(zfsvfs),