Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81fe8c62 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Jan Kara
Browse files

ext3/ioctl.c: silence sparse warnings about different address spaces



The 'from' argument for copy_from_user and the 'to' argument for
copy_to_user should both be tagged as __user address space.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent ad434017
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ long ext3_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
		if (!capable(CAP_SYS_ADMIN))
			return -EPERM;

		if (copy_from_user(&range, (struct fstrim_range *)arg,
		if (copy_from_user(&range, (struct fstrim_range __user *)arg,
				   sizeof(range)))
			return -EFAULT;

@@ -293,7 +293,7 @@ long ext3_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
		if (ret < 0)
			return ret;

		if (copy_to_user((struct fstrim_range *)arg, &range,
		if (copy_to_user((struct fstrim_range __user *)arg, &range,
				 sizeof(range)))
			return -EFAULT;