From: Fabian Frederick Date: Mon, 8 Jun 2015 16:23:21 +0000 (-0400) Subject: ext4 crypto: fix sparse warnings in fs/ext4/ioctl.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b4ab9e29820bf2e8842281a6b5e645e59c9992a5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ext4 crypto: fix sparse warnings in fs/ext4/ioctl.c [ Added another sparse fix for EXT4_IOC_GET_ENCRYPTION_POLICY while we're at it. --tytso ] Signed-off-by: Fabian Frederick Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 2cb9e178d1c5..7ce85824211b 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -675,8 +675,8 @@ encryption_policy_out: if (err) return err; } - if (copy_to_user((void *) arg, sbi->s_es->s_encrypt_pw_salt, - 16)) + if (copy_to_user((void __user *) arg, + sbi->s_es->s_encrypt_pw_salt, 16)) return -EFAULT; return 0; } @@ -690,7 +690,7 @@ encryption_policy_out: err = ext4_get_policy(inode, &policy); if (err) return err; - if (copy_to_user((void *)arg, &policy, sizeof(policy))) + if (copy_to_user((void __user *)arg, &policy, sizeof(policy))) return -EFAULT; return 0; #else