Commit b4ab9e29 authored by Fabian Frederick's avatar Fabian Frederick Committed by Theodore Ts'o

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: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 8bc3b1e6
...@@ -675,8 +675,8 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -675,8 +675,8 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (err) if (err)
return err; return err;
} }
if (copy_to_user((void *) arg, sbi->s_es->s_encrypt_pw_salt, if (copy_to_user((void __user *) arg,
16)) sbi->s_es->s_encrypt_pw_salt, 16))
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
...@@ -690,7 +690,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -690,7 +690,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
err = ext4_get_policy(inode, &policy); err = ext4_get_policy(inode, &policy);
if (err) if (err)
return 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 -EFAULT;
return 0; return 0;
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment