kern/145377: [zfs] [patch] fix zfs bug (vendor import)

Martin Matuska mm at
Sun Apr 4 11:20:11 UTC 2010

>Number:         145377
>Category:       kern
>Synopsis:       [zfs] [patch] fix zfs bug (vendor import)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 04 11:20:09 UTC 2010
>Originator:     Martin Matuska
>Release:        FreeBSD 8.0-RELEASE-p2 amd64
System: FreeBSD 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #16: Fri Jan 15 21:10:48 CET 2010 root at amd64
As reported by Andriy Gapon <abg at> via e-mail:

It seems that this commit causes a crash in zfs(1) when e.g. 'zfs list' is
executed and one of the filesystems has a user property set on it.

The crash is in zfs_prune_proplist function at

The issue has been fixed in OpenSolaris onnv-gate revision 9396.
An associated OpenSolaris bug-id cannot be determined.

Solution: partial vendor import of OpenSolaris rev. 9396 (just the bugfix)

@@ -4488,7 +3934,12 @@
 		zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr));
 		nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr);
-		if (props[zfs_prop] == B_FALSE)
+		/*
+		 * We leave user:props in the nvlist, so there will be
+		 * some ZPROP_INVAL.  To be extra safe, don't prune
+		 * those.
+		 */
+		if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE)
 			(void) nvlist_remove(zhp->zfs_props,
 			    nvpair_name(curr), nvpair_type(curr));
 		curr = next;

More information about the freebsd-bugs mailing list