From f6a24ce2a1971594651eb7fffcf2e237c2d6e4ea Mon Sep 17 00:00:00 2001 From: mav Date: Sun, 20 Mar 2016 23:56:02 +0000 Subject: [PATCH] MFC r294807: MFV r294806: 6388 Failure of userland copy should return EFAULT Reviewed by: Brian Behlendorf Reviewed by: Matthew Ahrens Reviewed by: Dan Kimmel Approved by: Robert Mustacchi Author: Richard Yao illumos/illumos-gate@c71c00bbe8a9cdc7e3f4048b751f48e80441d506 git-svn-id: svn://svn.freebsd.org/base/stable/10@297098 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c index 3e43bda84..7af63f627 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c @@ -1338,7 +1338,7 @@ get_nvlist(uint64_t nvl, uint64_t size, int iflag, nvlist_t **nvp) if ((error = ddi_copyin((void *)(uintptr_t)nvl, packed, size, iflag)) != 0) { kmem_free(packed, size); - return (error); + return (SET_ERROR(EFAULT)); } if ((error = nvlist_unpack(packed, size, &list, 0)) != 0) { -- 2.45.0