1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

MFV r249354:

Merge bugfixes accepted and integrated by vendor. Underlying problems
have been reported by us and fixed in r240942 and r249196.

Illumos ZFS issues:
  3645 dmu_send_impl: possibilty of pool hold leak
  3692 Panic on zfs receive of a recursive deduplicated stream

MFC after:	8 days
This commit is contained in:
Martin Matuska 2013-04-11 07:40:30 +00:00
commit 2cb0c5e424
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249356

View File

@ -1692,7 +1692,7 @@ add_ds_to_guidmap(const char *name, avl_tree_t *guid_map, uint64_t snapobj)
err = dsl_pool_hold(name, FTAG, &dp);
if (err != 0)
return (err);
gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP);
gmep = kmem_alloc(sizeof (*gmep), KM_SLEEP);
err = dsl_dataset_hold_obj(dp, snapobj, gmep, &snapds);
if (err == 0) {
gmep->guid = snapds->ds_phys->ds_guid;
@ -1700,7 +1700,7 @@ add_ds_to_guidmap(const char *name, avl_tree_t *guid_map, uint64_t snapobj)
avl_add(guid_map, gmep);
dsl_dataset_long_hold(snapds, gmep);
} else
kmem_free(gmep, sizeof (guid_map_entry_t));
kmem_free(gmep, sizeof (*gmep));
dsl_pool_rele(dp, FTAG);
return (err);