From 1d9aa838ed5a11a49676678e03e6f0d50ec05d78 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 9 Nov 2022 21:24:06 +0000 Subject: [PATCH] libzfs recv: Check if user prop before inheritable User props trigger an assert in zfs_prop_inheritable(), we must check if the prop is a user prop first. Signed-off-by: Ryan Moeller Backported as snippit from: 63652e1 Add --enable-asan and --enable-ubsan switches --- lib/libzfs/libzfs_sendrecv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 899cc84cf9..0dbd98b2be 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -4013,8 +4013,8 @@ zfs_setup_cmdline_props(libzfs_handle_t *hdl, zfs_type_t type, * properties: if we're asked to exclude this kind of * values we remove them from "recvprops" input nvlist. */ - if (!zfs_prop_inheritable(prop) && - !zfs_prop_user(name) && /* can be inherited too */ + if (!zfs_prop_user(name) && /* can be inherited too */ + !zfs_prop_inheritable(prop) && nvlist_exists(recvprops, name)) fnvlist_remove(recvprops, name); else