diff options
author | Jorgen Lundman <[email protected]> | 2019-03-19 12:34:30 +0900 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-03-21 10:36:58 -0700 |
commit | d10b2f1d35b76efc22c006ba9ca172681da301e7 (patch) | |
tree | 6b04a76aceffa71b476b40de2dc39b295d78166c | |
parent | 45001b949c14b09230a4cd6d105ab32a4673d286 (diff) |
Mutex leak in dsl_dataset_hold_obj()
In addition to dsl_dataset_evict_async() releasing a hold, there is
an error case in dsl_dataset_hold_obj() which had missed 4 additional
release calls. This was introduced in a1d477c24.
openzfsonosx-commit: https://github.com/openzfsonosx/zfs/commit/63ff7f1c
Authored by: Jorgen Lundman <[email protected]>
Reviewed-by: Olaf Faaland <[email protected]>
Reviewed by: Brian Behlendorf <[email protected]>
Ported-by: Brian Behlendorf <[email protected]>
Closes #8517
-rw-r--r-- | module/zfs/dsl_dataset.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index 086750fed..966c2cc93 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -650,10 +650,14 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uint64_t dsobj, void *tag, if (ds->ds_prev) dsl_dataset_rele(ds->ds_prev, ds); dsl_dir_rele(ds->ds_dir, ds); + list_destroy(&ds->ds_prop_cbs); + list_destroy(&ds->ds_sendstreams); mutex_destroy(&ds->ds_lock); mutex_destroy(&ds->ds_opening_lock); mutex_destroy(&ds->ds_sendstream_lock); + mutex_destroy(&ds->ds_remap_deadlist_lock); zfs_refcount_destroy(&ds->ds_longholds); + rrw_destroy(&ds->ds_bp_rwlock); kmem_free(ds, sizeof (dsl_dataset_t)); if (err != 0) { dmu_buf_rele(dbuf, tag); |