From ecc4acd3f9533011f289718aebcedd16671117ca Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 26 Jan 2016 12:51:41 +0000 Subject: [PATCH] 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 --- uts/common/fs/zfs/zfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uts/common/fs/zfs/zfs_ioctl.c b/uts/common/fs/zfs/zfs_ioctl.c index c863cbd399a8..933802fb496d 100644 --- a/uts/common/fs/zfs/zfs_ioctl.c +++ b/uts/common/fs/zfs/zfs_ioctl.c @@ -1303,7 +1303,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) {