summaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-05-02 19:49:46 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-02 19:49:46 -0400
commitdf889b363198d946c0286b3fb2cfcca18d08a029 (patch)
tree22846d29e33c6f01058d76b7aeccd64baa50731a /fs/splice.c
parentce8644fcadc52da72e19ae9f0866fb3eb15d3df4 (diff)
parent10c64cea04d3c75c306b3f990586ffb343b63287 (diff)
downloadlinux-df889b363198d946c0286b3fb2cfcca18d08a029.tar.bz2
Merge branch 'for-linus' into work.lookups
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/splice.c b/fs/splice.c
index b018eb485019..dd9bf7e410d2 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1143,6 +1143,9 @@ static long do_splice_to(struct file *in, loff_t *ppos,
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