svn commit: r249196 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Martin Matuska
mm at FreeBSD.org
Sat Apr 6 11:54:42 UTC 2013
Author: mm
Date: Sat Apr 6 11:54:41 2013
New Revision: 249196
URL: http://svnweb.freebsd.org/changeset/base/249196
Log:
Provide a fix for kernel panic if receiving recursive deduplicated streams.
Problem reported to vendor.
Illumos ZFS issues:
3692 Panic on zfs receive of a recursive deduplicated stream
MFC after: 2 weeks
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sat Apr 6 10:39:38 2013 (r249195)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sat Apr 6 11:54:41 2013 (r249196)
@@ -990,6 +990,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);
@@ -1691,15 +1692,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 (guid_map_entry_t), 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 (guid_map_entry_t));
dsl_pool_rele(dp, FTAG);
return (err);
More information about the svn-src-all
mailing list