From 3dec96b90274817eb878d037bcffdddd3b4beed1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 23 Feb 2022 11:31:25 +0100 Subject: [PATCH] more fixups --- ...-initialize-flags-in-new-pipe_buffer.patch | 43 +++++++++++++++++++ queue-5.10/series | 1 + ...-initialize-flags-in-new-pipe_buffer.patch | 43 +++++++++++++++++++ queue-5.15/series | 1 + ...-initialize-flags-in-new-pipe_buffer.patch | 43 +++++++++++++++++++ queue-5.16/series | 1 + 6 files changed, 132 insertions(+) create mode 100644 queue-5.10/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch create mode 100644 queue-5.15/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch create mode 100644 queue-5.16/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch diff --git a/queue-5.10/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch b/queue-5.10/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch new file mode 100644 index 00000000000..1ba7b1bcb52 --- /dev/null +++ b/queue-5.10/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch @@ -0,0 +1,43 @@ +From 9d2231c5d74e13b2a0546fee6737ee4446017903 Mon Sep 17 00:00:00 2001 +From: Max Kellermann +Date: Mon, 21 Feb 2022 11:03:13 +0100 +Subject: lib/iov_iter: initialize "flags" in new pipe_buffer + +From: Max Kellermann + +commit 9d2231c5d74e13b2a0546fee6737ee4446017903 upstream. + +The functions copy_page_to_iter_pipe() and push_pipe() can both +allocate a new pipe_buffer, but the "flags" member initializer is +missing. + +Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") +To: Alexander Viro +To: linux-fsdevel@vger.kernel.org +To: linux-kernel@vger.kernel.org +Cc: stable@vger.kernel.org +Signed-off-by: Max Kellermann +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman +--- + lib/iov_iter.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/lib/iov_iter.c ++++ b/lib/iov_iter.c +@@ -407,6 +407,7 @@ static size_t copy_page_to_iter_pipe(str + return 0; + + buf->ops = &page_cache_pipe_buf_ops; ++ buf->flags = 0; + get_page(page); + buf->page = page; + buf->offset = offset; +@@ -543,6 +544,7 @@ static size_t push_pipe(struct iov_iter + 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); diff --git a/queue-5.10/series b/queue-5.10/series index 7217caa409a..ee0d9e98c28 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -98,6 +98,7 @@ arm64-dts-meson-g12-drop-bl32-region-from-sei510-sei.patch pidfd-fix-test-failure-due-to-stack-overflow-on-some.patch selftests-fixup-build-warnings-in-pidfd-clone3-tests.patch kconfig-let-shell-return-enough-output-for-deep-path.patch +lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch ata-libata-core-disable-trim-on-m88v29.patch soc-aspeed-lpc-ctrl-block-error-printing-on-probe-de.patch xprtrdma-fix-pointer-derefs-in-error-cases-of-rpcrdm.patch diff --git a/queue-5.15/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch b/queue-5.15/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch new file mode 100644 index 00000000000..bcea1e72710 --- /dev/null +++ b/queue-5.15/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch @@ -0,0 +1,43 @@ +From 9d2231c5d74e13b2a0546fee6737ee4446017903 Mon Sep 17 00:00:00 2001 +From: Max Kellermann +Date: Mon, 21 Feb 2022 11:03:13 +0100 +Subject: lib/iov_iter: initialize "flags" in new pipe_buffer + +From: Max Kellermann + +commit 9d2231c5d74e13b2a0546fee6737ee4446017903 upstream. + +The functions copy_page_to_iter_pipe() and push_pipe() can both +allocate a new pipe_buffer, but the "flags" member initializer is +missing. + +Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") +To: Alexander Viro +To: linux-fsdevel@vger.kernel.org +To: linux-kernel@vger.kernel.org +Cc: stable@vger.kernel.org +Signed-off-by: Max Kellermann +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman +--- + lib/iov_iter.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/lib/iov_iter.c ++++ b/lib/iov_iter.c +@@ -416,6 +416,7 @@ static size_t copy_page_to_iter_pipe(str + return 0; + + buf->ops = &page_cache_pipe_buf_ops; ++ buf->flags = 0; + get_page(page); + buf->page = page; + buf->offset = offset; +@@ -532,6 +533,7 @@ static size_t push_pipe(struct iov_iter + 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); diff --git a/queue-5.15/series b/queue-5.15/series index 7734718661a..2d25287f82e 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -176,6 +176,7 @@ ucounts-handle-wrapping-in-is_ucounts_overlimit.patch ucounts-in-set_cred_ucounts-assume-new-ucounts-is-non-null.patch ucounts-base-set_cred_ucounts-changes-on-the-real-user.patch ucounts-enforce-rlimit_nproc-not-rlimit_nproc-1.patch +lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch rlimit-fix-rlimit_nproc-enforcement-failure-caused-by-capability-calls-in-set_user.patch ucounts-move-rlimit_nproc-handling-after-set_user.patch net-sched-limit-tc_act_repeat-loops.patch diff --git a/queue-5.16/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch b/queue-5.16/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch new file mode 100644 index 00000000000..782965d3014 --- /dev/null +++ b/queue-5.16/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch @@ -0,0 +1,43 @@ +From 9d2231c5d74e13b2a0546fee6737ee4446017903 Mon Sep 17 00:00:00 2001 +From: Max Kellermann +Date: Mon, 21 Feb 2022 11:03:13 +0100 +Subject: lib/iov_iter: initialize "flags" in new pipe_buffer + +From: Max Kellermann + +commit 9d2231c5d74e13b2a0546fee6737ee4446017903 upstream. + +The functions copy_page_to_iter_pipe() and push_pipe() can both +allocate a new pipe_buffer, but the "flags" member initializer is +missing. + +Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") +To: Alexander Viro +To: linux-fsdevel@vger.kernel.org +To: linux-kernel@vger.kernel.org +Cc: stable@vger.kernel.org +Signed-off-by: Max Kellermann +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman +--- + lib/iov_iter.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/lib/iov_iter.c ++++ b/lib/iov_iter.c +@@ -416,6 +416,7 @@ static size_t copy_page_to_iter_pipe(str + return 0; + + buf->ops = &page_cache_pipe_buf_ops; ++ buf->flags = 0; + get_page(page); + buf->page = page; + buf->offset = offset; +@@ -579,6 +580,7 @@ static size_t push_pipe(struct iov_iter + 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); diff --git a/queue-5.16/series b/queue-5.16/series index 9e596f71913..d8c4998ea8f 100644 --- a/queue-5.16/series +++ b/queue-5.16/series @@ -204,6 +204,7 @@ x86-bug-merge-annotate_reachable-into-_bug_flags-asm.patch netfilter-conntrack-don-t-refresh-sctp-entries-in-cl.patch ksmbd-fix-same-uniqueid-for-dot-and-dotdot-entries.patch ksmbd-don-t-align-last-entry-offset-in-smb2-query-di.patch +lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch arm64-dts-meson-gx-add-atf-bl32-reserved-memory-regi.patch arm64-dts-meson-g12-add-atf-bl32-reserved-memory-reg.patch arm64-dts-meson-g12-drop-bl32-region-from-sei510-sei.patch -- 2.47.3