Date: Thu, 11 Apr 2013 07:02:28 +0000 (UTC) From: Martin Matuska <mm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249354 - vendor-sys/illumos/dist/uts/common/fs/zfs Message-ID: <201304110702.r3B72S4G058508@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mm Date: Thu Apr 11 07:02:27 2013 New Revision: 249354 URL: http://svnweb.freebsd.org/changeset/base/249354 Log: Update vendor-sys/illumos/dist to illumos-gate 14008:0a1a841641da Illumos ZFS issues: 3645 dmu_send_impl: possibilty of pool hold leak 3692 Panic on zfs receive of a recursive deduplicated stream Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Thu Apr 11 06:52:19 2013 (r249353) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Thu Apr 11 07:02:27 2013 (r249354) @@ -479,14 +479,14 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, 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); @@ -960,6 +960,7 @@ free_guid_map_onexit(void *arg) while ((gmep = avl_destroy_nodes(ca, &cookie)) != NULL) { dsl_dataset_long_rele(gmep->gme_ds, gmep); + dsl_dataset_rele(gmep->gme_ds, gmep); kmem_free(gmep, sizeof (guid_map_entry_t)); } avl_destroy(ca); @@ -1636,14 +1637,15 @@ add_ds_to_guidmap(const char *name, avl_ err = dsl_pool_hold(name, FTAG, &dp); if (err != 0) return (err); - err = dsl_dataset_hold_obj(dp, snapobj, FTAG, &snapds); + gmep = kmem_alloc(sizeof (*gmep), KM_SLEEP); + err = dsl_dataset_hold_obj(dp, snapobj, gmep, &snapds); if (err == 0) { - gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP); gmep->guid = snapds->ds_phys->ds_guid; gmep->gme_ds = snapds; avl_add(guid_map, gmep); dsl_dataset_long_hold(snapds, gmep); - dsl_dataset_rele(snapds, FTAG); + } else { + kmem_free(gmep, sizeof (*gmep)); } dsl_pool_rele(dp, FTAG);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304110702.r3B72S4G058508>