Date: Wed, 14 Sep 2016 09:12:49 +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-11@freebsd.org Subject: svn commit: r305799 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201609140912.u8E9CnLo037986@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Sep 14 09:12:49 2016 New Revision: 305799 URL: https://svnweb.freebsd.org/changeset/base/305799 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/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Wed Sep 14 09:11:03 2016 (r305798) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Wed Sep 14 09:12:49 2016 (r305799) @@ -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?201609140912.u8E9CnLo037986>