From: Al Viro Date: Thu, 23 Apr 2020 17:52:23 +0000 (-0400) Subject: dlmfs_file_write(): get rid of pointless access_ok() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=37d59a5148a2746555c02e10b9fb70038afd3ca7;p=linux.git dlmfs_file_write(): get rid of pointless access_ok() address passed only to copy_from_user() Signed-off-by: Al Viro --- diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 1de77f1a600b2..a06f19b67d3bc 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c @@ -291,9 +291,6 @@ static ssize_t dlmfs_file_write(struct file *filp, if (!count) return 0; - if (!access_ok(buf, count)) - return -EFAULT; - lvb_buf = kmalloc(count, GFP_NOFS); if (!lvb_buf) return -ENOMEM;