Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2016 11:55:32 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305123 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201608311155.u7VBtWiE098253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Aug 31 11:55:31 2016
New Revision: 305123
URL: https://svnweb.freebsd.org/changeset/base/305123

Log:
  Fix kernel panic when inheriting properties without default.
  
  There are two writable hidden properties "iscsioptions" and "stmf_sbd_lu",
  that have no default string value.  Attempt to unset them or replicate
  caused kernel panic.  This simple bandaid seems fixes the problem nicely.
  
  MFC after:	2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c	Wed Aug 31 11:51:52 2016	(r305122)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c	Wed Aug 31 11:55:31 2016	(r305123)
@@ -54,6 +54,8 @@ dodefault(zfs_prop_t prop, int intsz, in
 		return (SET_ERROR(ENOENT));
 
 	if (zfs_prop_get_type(prop) == PROP_TYPE_STRING) {
+		if (zfs_prop_default_string(prop) == NULL)
+			return (SET_ERROR(ENOENT));
 		if (intsz != 1)
 			return (SET_ERROR(EOVERFLOW));
 		(void) strncpy(buf, zfs_prop_default_string(prop),



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