Skip to content

Commit

Permalink
ext4 crypto: fix sparse warnings in fs/ext4/ioctl.c
Browse files Browse the repository at this point in the history
[ Added another sparse fix for EXT4_IOC_GET_ENCRYPTION_POLICY while
  we're at it. --tytso ]

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Fabian Frederick authored and Theodore Ts'o committed Jun 8, 2015
1 parent 8bc3b1e commit b4ab9e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ext4/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
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;
}
Expand All @@ -690,7 +690,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
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
Expand Down

0 comments on commit b4ab9e2

Please sign in to comment.