diff options
author | mav <mav@FreeBSD.org> | 2016-09-14 09:13:17 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-09-14 09:13:17 +0000 |
commit | 2932b17b57ff48e04b2980989e1f731b238ff4ec (patch) | |
tree | 48615191547be62699103fed2d03ac69c57bc143 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c | |
parent | b536ad3bd833c265e23d520e71b1f92c31ee5fb1 (diff) | |
download | FreeBSD-src-2932b17b57ff48e04b2980989e1f731b238ff4ec.zip FreeBSD-src-2932b17b57ff48e04b2980989e1f731b238ff4ec.tar.gz |
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.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c index 8586cb6..25a7d96 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c @@ -54,6 +54,8 @@ dodefault(zfs_prop_t prop, int intsz, int numints, void *buf) 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), |