tree 607f1e99cefab35bccb14b5c053c0d63ff74458c parent 22a685d09bb98810670ac0fb02c2138bdbf038cc author Dave Hansen <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:25:49 -0700 committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:25:49 -0700
[PATCH] undo do_readv_writev() behavior change Bugme bug 4326: http://bugme.osdl.org/show_bug.cgi?id=4326 reports: executing the systemcall readv with Bad argument ->len == -1) it gives out error EFAULT instead of EINVAL Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> read_write.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: fs/read_write.c =================================================================== --- dbd4fd3cdfdb5a7695d2d44f698cdd757b8c67eb/fs/read_write.c (mode:100644 sha1:6be4b1a1956b21004c2b03382f6f4b08ecc957d3) +++ 607f1e99cefab35bccb14b5c053c0d63ff74458c/fs/read_write.c (mode:100644 sha1:c4c2bee373eddeab7b0d3bb9e110453a63ccd436) @@ -467,10 +467,10 @@ void __user *buf = iov[seg].iov_base; ssize_t len = (ssize_t)iov[seg].iov_len; - if (unlikely(!access_ok(vrfy_dir(type), buf, len))) - goto Efault; if (len < 0) /* size_t not fitting an ssize_t .. */ goto out; + if (unlikely(!access_ok(vrfy_dir(type), buf, len))) + goto Efault; tot_len += len; if ((ssize_t)tot_len < 0) /* maths overflow on the ssize_t */ goto out; - To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
