diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-10-14 15:08:17 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-22 21:34:57 -0800 |
commit | 808788efff20923a0363a3add9cb4dee3f83a8fe (patch) | |
tree | f33adbf15677964a8a505ac18939a2d3d3ec215a /fs/xfs/xfs_bmap_util.c | |
parent | 6c90658041b549ae0a4cfe8b5b0a722bb3275161 (diff) |
splice: only read in as much information as there is pipe buffer space
Andreas Grünbacher reports that on the two filesystems that support
iomap directio, it's possible for splice() to return -EAGAIN (instead of
a short splice) if the pipe being written to has less space available in
its pipe buffers than the length supplied by the calling process.
Months ago we fixed splice_direct_to_actor to clamp the length of the
read request to the size of the splice pipe. Do the same to do_splice.
Fixes: 17614445576b6 ("splice: don't read more than available pipe space")
Reported-by: syzbot+3c01db6025f26530cf8d@syzkaller.appspotmail.com
Reported-by: Andreas Grünbacher <andreas.gruenbacher@gmail.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
0 files changed, 0 insertions, 0 deletions