Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Sep 2016 09:13:17 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r305800 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201609140913.u8E9DHPH038060@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Sep 14 09:13:17 2016
New Revision: 305800
URL: https://svnweb.freebsd.org/changeset/base/305800

Log:
  MFC r305123: 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.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c	Wed Sep 14 09:12:49 2016	(r305799)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c	Wed Sep 14 09:13:17 2016	(r305800)
@@ -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?201609140913.u8E9DHPH038060>