Skip to content

Commit

Permalink
Fix possible pool hold leak in dmu_send_impl()
Browse files Browse the repository at this point in the history
Problem reported to vendor:
  https://www.illumos.org/issues/3645

Reported by:	Andriy Gapon <avg@FreeBSD.org>
MFC after:	15 days
  • Loading branch information
mmatuska committed Apr 3, 2013
1 parent fe05bc1 commit cfe5852
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,14 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *ds,
list_insert_head(&ds->ds_sendstreams, dsp);
mutex_exit(&ds->ds_sendstream_lock);

dsl_dataset_long_hold(ds, FTAG);
dsl_pool_rele(dp, tag);

if (dump_bytes(dsp, drr, sizeof (dmu_replay_record_t)) != 0) {
err = dsp->dsa_err;
goto out;
}

dsl_dataset_long_hold(ds, FTAG);
dsl_pool_rele(dp, tag);

err = traverse_dataset(ds, fromtxg, TRAVERSE_PRE | TRAVERSE_PREFETCH,
backup_cb, dsp);

Expand Down

0 comments on commit cfe5852

Please sign in to comment.