summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorTomohiro Kusumi <[email protected]>2019-07-26 03:59:20 +0900
committerBrian Behlendorf <[email protected]>2019-07-25 11:59:20 -0700
commitd274ac54609894d00a49c0a0da89abd3a7f3998d (patch)
tree5e487a50f7f0d0d34aaff753a2760e8c852fdbcb /module/zfs
parent1ff46825e232b3ad3414f60fab8dcba8ed17d778 (diff)
Don't directly cast unsigned long to void*
Cast to uintptr_t first for portability on integer to/from pointer conversion. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #9065
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zfs_ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index c2b75cc98..9f4991162 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -7331,7 +7331,8 @@ zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg)
zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
- error = ddi_copyin((void *)arg, zc, sizeof (zfs_cmd_t), flag);
+ error = ddi_copyin((void *)(uintptr_t)arg, zc, sizeof (zfs_cmd_t),
+ flag);
if (error != 0) {
error = SET_ERROR(EFAULT);
goto out;
@@ -7498,7 +7499,7 @@ zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg)
out:
nvlist_free(innvl);
- rc = ddi_copyout(zc, (void *)arg, sizeof (zfs_cmd_t), flag);
+ rc = ddi_copyout(zc, (void *)(uintptr_t)arg, sizeof (zfs_cmd_t), flag);
if (error == 0 && rc != 0)
error = SET_ERROR(EFAULT);
if (error == 0 && vec->zvec_allow_log) {