Permalink
Browse files

Fix possible pool hold leak in dmu_send_impl()

Problem reported to vendor:
  https://www.illumos.org/issues/3645

Reported by:	Andriy Gapon <avg@FreeBSD.org>
MFC after:	15 days
  • Loading branch information...
1 parent fe05bc1 commit cfe5852fae3b2d38b252d16e354fe70c3a218ead @mmatuska mmatuska committed Apr 3, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
@@ -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);

0 comments on commit cfe5852

Please sign in to comment.