]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19 and 5.4 fixup
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 10:30:10 +0000 (11:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 10:30:10 +0000 (11:30 +0100)
queue-4.19/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch [new file with mode: 0644]
queue-4.19/series
queue-5.4/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-4.19/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch b/queue-4.19/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch
new file mode 100644 (file)
index 0000000..9f9dfd1
--- /dev/null
@@ -0,0 +1,43 @@
+From 9d2231c5d74e13b2a0546fee6737ee4446017903 Mon Sep 17 00:00:00 2001
+From: Max Kellermann <max.kellermann@ionos.com>
+Date: Mon, 21 Feb 2022 11:03:13 +0100
+Subject: lib/iov_iter: initialize "flags" in new pipe_buffer
+
+From: Max Kellermann <max.kellermann@ionos.com>
+
+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 <viro@zeniv.linux.org.uk>
+To: linux-fsdevel@vger.kernel.org
+To: linux-kernel@vger.kernel.org
+Cc: stable@vger.kernel.org
+Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/iov_iter.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/lib/iov_iter.c
++++ b/lib/iov_iter.c
+@@ -393,6 +393,7 @@ static size_t copy_page_to_iter_pipe(str
+               return 0;
+       pipe->nrbufs++;
+       buf->ops = &page_cache_pipe_buf_ops;
++      buf->flags = 0;
+       get_page(buf->page = page);
+       buf->offset = offset;
+       buf->len = bytes;
+@@ -517,6 +518,7 @@ static size_t push_pipe(struct iov_iter
+                       break;
+               pipe->nrbufs++;
+               pipe->bufs[idx].ops = &default_pipe_buf_ops;
++              pipe->bufs[idx].flags = 0;
+               pipe->bufs[idx].page = page;
+               pipe->bufs[idx].offset = 0;
+               if (left <= PAGE_SIZE) {
index 2fbbfbcb1a226278530cdb47911248240344aeb5..fe52af81905d22b4a2602cc354f2906da58e45db 100644 (file)
@@ -42,6 +42,7 @@ edac-fix-calculation-of-returned-address-and-next-offset-in-edac_align_ptr.patch
 net-sched-limit-tc_act_repeat-loops.patch
 dmaengine-sh-rcar-dmac-check-for-error-num-after-setting-mask.patch
 i2c-brcmstb-fix-support-for-dsl-and-cm-variants.patch
+lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch
 mtd-rawnand-brcmnand-refactored-code-to-introduce-he.patch
 mtd-rawnand-brcmnand-fixed-incorrect-sub-page-ecc-st.patch
 drivers-hv-vmbus-expose-monitor-data-only-when-monit.patch
diff --git a/queue-5.4/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch b/queue-5.4/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch
new file mode 100644 (file)
index 0000000..ac7c82c
--- /dev/null
@@ -0,0 +1,43 @@
+From 9d2231c5d74e13b2a0546fee6737ee4446017903 Mon Sep 17 00:00:00 2001
+From: Max Kellermann <max.kellermann@ionos.com>
+Date: Mon, 21 Feb 2022 11:03:13 +0100
+Subject: lib/iov_iter: initialize "flags" in new pipe_buffer
+
+From: Max Kellermann <max.kellermann@ionos.com>
+
+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 <viro@zeniv.linux.org.uk>
+To: linux-fsdevel@vger.kernel.org
+To: linux-kernel@vger.kernel.org
+Cc: stable@vger.kernel.org
+Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/iov_iter.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/lib/iov_iter.c
++++ b/lib/iov_iter.c
+@@ -398,6 +398,7 @@ static size_t copy_page_to_iter_pipe(str
+               return 0;
+       pipe->nrbufs++;
+       buf->ops = &page_cache_pipe_buf_ops;
++      buf->flags = 0;
+       get_page(buf->page = page);
+       buf->offset = offset;
+       buf->len = bytes;
+@@ -524,6 +525,7 @@ static size_t push_pipe(struct iov_iter
+                       break;
+               pipe->nrbufs++;
+               pipe->bufs[idx].ops = &default_pipe_buf_ops;
++              pipe->bufs[idx].flags = 0;
+               pipe->bufs[idx].page = page;
+               pipe->bufs[idx].offset = 0;
+               if (left <= PAGE_SIZE) {
index 04e8bd8190844c4a4fc44f7782efac4a574295ea..07fe2eb924f6f3dd4222e8f91c60388c2c16ab5d 100644 (file)
@@ -56,6 +56,7 @@ mtd-rawnand-qcom-fix-clock-sequencing-in-qcom_nandc_probe.patch
 mtd-rawnand-brcmnand-fixed-incorrect-sub-page-ecc-status.patch
 scsi-lpfc-fix-pt2pt-nvme-prli-reject-logo-loop.patch
 edac-fix-calculation-of-returned-address-and-next-offset-in-edac_align_ptr.patch
+lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch
 net-sched-limit-tc_act_repeat-loops.patch
 dmaengine-sh-rcar-dmac-check-for-error-num-after-setting-mask.patch
 copy_process-move-fd_install-out-of-sighand-siglock-critical-section.patch