1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Max Kellermann <max.kellermann@ionos.com>
3 Date: Mon, 21 Feb 2022 11:03:13 +0100
4 Subject: [PATCH] lib/iov_iter: initialize "flags" in new pipe_buffer
6 commit 9d2231c5d74e13b2a0546fee6737ee4446017903 upstream.
8 The functions copy_page_to_iter_pipe() and push_pipe() can both
9 allocate a new pipe_buffer, but the "flags" member initializer is
12 Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed")
13 To: Alexander Viro <viro@zeniv.linux.org.uk>
14 To: linux-fsdevel@vger.kernel.org
15 To: linux-kernel@vger.kernel.org
16 Cc: stable@vger.kernel.org
17 Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
18 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 1 file changed, 2 insertions(+)
25 diff --git a/lib/iov_iter.c b/lib/iov_iter.c
26 index 9ffa7dc197be..fa5827e2e9a3 100644
29 @@ -449,6 +449,7 @@ static size_t copy_page_to_iter_pipe(struct page *page, size_t offset, size_t by
32 buf->ops = &page_cache_pipe_buf_ops;
37 @@ -564,6 +565,7 @@ static size_t push_pipe(struct iov_iter *i, size_t size,
40 buf->ops = &default_pipe_buf_ops;
44 buf->len = min_t(ssize_t, left, PAGE_SIZE);