svn commit: r288539 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Sat Oct 3 07:21:28 UTC 2015
Author: mav
Date: Sat Oct 3 07:21:27 2015
New Revision: 288539
URL: https://svnweb.freebsd.org/changeset/base/288539
Log:
MFC r286543: 5592 NULL pointer dereference in dsl_prop_notify_all_cb()
Reviewed by: Dan McDonald <danmcd at omniti.com>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: George Wilson <george at delphix.com>
Reviewed by: Will Andrews <will at freebsd.org>
Approved by: Robert Mustacchi <rm at joyent.com>
illumos/illumos-gate at 9d47dec0481d8cd53b2c1053c96bfa3f78357d6a
Modified:
stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sat Oct 3 07:20:26 2015 (r288538)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sat Oct 3 07:21:27 2015 (r288539)
@@ -372,8 +372,19 @@ dsl_dataset_snap_remove(dsl_dataset_t *d
boolean_t
dsl_dataset_try_add_ref(dsl_pool_t *dp, dsl_dataset_t *ds, void *tag)
{
- return (dmu_buf_try_add_ref(ds->ds_dbuf, dp->dp_meta_objset,
- ds->ds_object, DMU_BONUS_BLKID, tag));
+ dmu_buf_t *dbuf = ds->ds_dbuf;
+ boolean_t result = B_FALSE;
+
+ if (dbuf != NULL && dmu_buf_try_add_ref(dbuf, dp->dp_meta_objset,
+ ds->ds_object, DMU_BONUS_BLKID, tag)) {
+
+ if (ds == dmu_buf_get_user(dbuf))
+ result = B_TRUE;
+ else
+ dmu_buf_rele(dbuf, tag);
+ }
+
+ return (result);
}
int
More information about the svn-src-stable-10
mailing list