mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
MFV 286542: 5592 NULL pointer dereference in dsl_prop_notify_all_cb()
Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george@delphix.com> Reviewed by: Will Andrews <will@freebsd.org> Approved by: Robert Mustacchi <rm@joyent.com> illumos/illumos-gate@9d47dec048
This commit is contained in:
parent
1d367fea94
commit
07470009be
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286543
@ -372,8 +372,19 @@ dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx,
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user