diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-22 10:31:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-22 10:31:53 -0800 |
commit | 917bbdb107f8767cb78f24e7d6725a2f93b9effe (patch) | |
tree | 94b4a6848437f380981aa95b1927a666886032e9 | |
parent | 038101e6b2cd5c55f888f85db42ea2ad3aecb4b6 (diff) | |
parent | 9d2231c5d74e13b2a0546fee6737ee4446017903 (diff) |
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
-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); |