diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-09 09:01:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-09 09:01:21 -0700 |
commit | 339fbf6796f8e74544091adbf511286768eaf93e (patch) | |
tree | 12840783d0eb70d1a7ecd13c3a7fab5b69b0a2b6 /lib | |
parent | 8ee74a91ac304ad2e9e794eb96ed76f0634dec40 (diff) | |
parent | 5b47d59af68a8735e4637bacedcb4baf6f47c73f (diff) |
Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fix from Al Viro:
"Braino fix for iov_iter_revert() misuse"
* 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fix braino in generic_file_read_iter()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iov_iter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index ae82d9cea553..f835964c9485 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -790,6 +790,8 @@ void iov_iter_revert(struct iov_iter *i, size_t unroll) { if (!unroll) return; + if (WARN_ON(unroll > MAX_RW_COUNT)) + return; i->count += unroll; if (unlikely(i->type & ITER_PIPE)) { struct pipe_inode_info *pipe = i->pipe; |