commit | 03cc0789a690eb9ab07070376252961caeae7441 | [log] [tgz] |
---|---|---|
author | Al Viro <viro@zeniv.linux.org.uk> | Sat Apr 02 14:56:58 2016 -0400 |
committer | Al Viro <viro@zeniv.linux.org.uk> | Sun Apr 03 19:52:59 2016 -0400 |
tree | 571ea10fc6edaf214c0442494793a6635d05c045 | |
parent | 7500c38ac3258815f86f41744a538850c3221b23 [diff] [blame] |
do_splice_to(): cap the size before passing to ->splice_read() pipe capacity won't exceed 2G anyway. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/fs/splice.c b/fs/splice.c index 9947b5c..a6b87b7 100644 --- a/fs/splice.c +++ b/fs/splice.c
@@ -1143,6 +1143,9 @@ if (unlikely(ret < 0)) return ret; + if (unlikely(len > MAX_RW_COUNT)) + len = MAX_RW_COUNT; + if (in->f_op->splice_read) splice_read = in->f_op->splice_read; else