diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-22 19:31:53 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-22 19:31:53 +0100 |
commit | 917bbdb107f8767cb78f24e7d6725a2f93b9effe (patch) | |
tree | 94b4a6848437f380981aa95b1927a666886032e9 /lib | |
parent | Merge tag 'platform-drivers-x86-v5.17-3' of git://git.kernel.org/pub/scm/linu... (diff) | |
parent | lib/iov_iter: initialize "flags" in new pipe_buffer (diff) | |
download | linux-917bbdb107f8767cb78f24e7d6725a2f93b9effe.tar.xz linux-917bbdb107f8767cb78f24e7d6725a2f93b9effe.zip |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull ITER_PIPE fix from Al Viro:
"Fix for old sloppiness in pipe_buffer reuse"
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
lib/iov_iter: initialize "flags" in new pipe_buffer
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 b0e0acdf96c1..6dd5330f7a99 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -414,6 +414,7 @@ static size_t copy_page_to_iter_pipe(struct page *page, size_t offset, size_t by return 0; buf->ops = &page_cache_pipe_buf_ops; + buf->flags = 0; get_page(page); buf->page = page; buf->offset = offset; @@ -577,6 +578,7 @@ static size_t push_pipe(struct iov_iter *i, size_t size, break; buf->ops = &default_pipe_buf_ops; + buf->flags = 0; buf->page = page; buf->offset = 0; buf->len = min_t(ssize_t, left, PAGE_SIZE); |