From: Corey Minyard Date: Tue, 21 Jan 2014 23:48:44 +0000 (-0800) Subject: fs/read_write.c:compat_readv(): remove bogus area verify X-Git-Tag: v3.14-rc1~134^2~92 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e4f9e66a75921aa260c2f5bf626bdea54e51ba2;p=pandora-kernel.git fs/read_write.c:compat_readv(): remove bogus area verify The compat_do_readv_writev() function was doing a verify_area on the incoming iov, but the nr_segs value is not checked. If someone passes in a -1 for nr_segs, for instance, the function should return an EINVAL. However, it returns a EFAULT because the verify_area fails because it is checking an array of size MAX_UINT. The check is bogus, anyway, because the next check, compat_rw_copy_check_uvector(), will do all the necessary checking, anyway. The non-compat do_readv_writev() function doesn't do this check, so I think it's safe to just remove the code. Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed