Skip site navigation (1)Skip section navigation (2)
Date:      Sun,  4 Apr 2010 13:19:52 +0200 (CEST)
From:      Martin Matuska <mm@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/145377: [zfs] [patch] fix zfs bug (vendor import)
Message-ID:  <20100404111952.AD74529BBD@mail2.vx.sk>
Resent-Message-ID: <201004041120.o34BK9Pa063892@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         145377
>Category:       kern
>Synopsis:       [zfs] [patch] fix zfs bug (vendor import)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 04 11:20:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 8.0-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #16: Fri Jan 15 21:10:48 CET 2010 root@neo.vx.sk:/usr/obj/usr/src/sys/NEO amd64
>Description:
As reported by Andriy Gapon <abg@FreeBSD.org> 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
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c:4291.
"

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)

References:
http://src.opensolaris.org/source/diff/onnv/onnv-gate/usr/src/lib/libzfs/common/libzfs_dataset.c?r2=%252Fonnv%252Fonnv-gate%252Fusr%252Fsrc%252Flib%252Flibzfs%252Fcommon%252Flibzfs_dataset.c%409396%3Af41cf682d0d3&r1=%252Fonnv%252Fonnv-gate%252Fusr%252Fsrc%252Flib%252Flibzfs%252Fcommon%252Flibzfs_dataset.c%408845%3A91af0d9c0790
>How-To-Repeat:
>Fix:
@@ -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;
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100404111952.AD74529BBD>