Re: [PATCH 11/11] ext4: remove the access_ok() check in ext4_ioctl_get_es_cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 4/27/20 11:49 PM, Christoph Hellwig wrote:
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 <hch@xxxxxx>

Looks fine. Feel free to add
Reviewed-by: Ritesh Harjani <riteshh@xxxxxxxxxxxxx>


---
  fs/ext4/ioctl.c | 5 -----
  1 file changed, 5 deletions(-)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 0746532ba463d..7fded54d2dba9 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -754,11 +754,6 @@ static int ext4_ioctl_get_es_cache(struct file *filp, unsigned long arg)
  	fieinfo.fi_extents_max = fiemap.fm_extent_count;
  	fieinfo.fi_extents_start = ufiemap->fm_extents;
- if (fiemap.fm_extent_count != 0 &&
-	    !access_ok(fieinfo.fi_extents_start,
-		       fieinfo.fi_extents_max * sizeof(struct fiemap_extent)))
-		return -EFAULT;
-
  	if (fieinfo.fi_flags & FIEMAP_FLAG_SYNC)
  		filemap_write_and_wait(inode->i_mapping);



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux