Skip to content

Commit ba98890

Browse files
Christoph Hellwigtytso
authored andcommitted
ext4: remove the access_ok() check in ext4_ioctl_get_es_cache
access_ok just checks we are fed a proper user pointer. We also do that in copy_to_user itself, so no need to do this early. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Ritesh Harjani <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent c7d216e commit ba98890

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

fs/ext4/ioctl.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,6 @@ static int ext4_ioctl_get_es_cache(struct file *filp, unsigned long arg)
754754
fieinfo.fi_extents_max = fiemap.fm_extent_count;
755755
fieinfo.fi_extents_start = ufiemap->fm_extents;
756756

757-
if (fiemap.fm_extent_count != 0 &&
758-
!access_ok(fieinfo.fi_extents_start,
759-
fieinfo.fi_extents_max * sizeof(struct fiemap_extent)))
760-
return -EFAULT;
761-
762757
error = ext4_get_es_cache(inode, &fieinfo, fiemap.fm_start,
763758
fiemap.fm_length);
764759
fiemap.fm_flags = fieinfo.fi_flags;

0 commit comments

Comments
 (0)