]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up some 4.9 and 4.14 patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 10:23:54 +0000 (11:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 10:23:54 +0000 (11:23 +0100)
queue-4.14/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch [new file with mode: 0644]
queue-4.14/nfs-do-not-report-writeback-errors-in-nfs_getattr.patch
queue-4.14/series
queue-4.9/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch [new file with mode: 0644]
queue-4.9/nfs-do-not-report-writeback-errors-in-nfs_getattr.patch
queue-4.9/series

diff --git a/queue-4.14/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch b/queue-4.14/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 b25a8dbedd6a718c240a23e3cb061b54bf883a28..613338bb1704c6c032b333ed5dc98b8eb3add6a7 100644 (file)
@@ -16,14 +16,12 @@ Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
 Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- fs/nfs/inode.c | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
+ fs/nfs/inode.c |    9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
 
-diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
-index ad01d4fb795ee..5774dc2c5c2bf 100644
 --- a/fs/nfs/inode.c
 +++ b/fs/nfs/inode.c
-@@ -740,11 +740,8 @@ int nfs_getattr(const struct path *path, struct kstat *stat,
+@@ -740,11 +740,8 @@ int nfs_getattr(const struct path *path,
  
        trace_nfs_getattr_enter(inode);
        /* Flush out writes to the server in order to update c/mtime.  */
@@ -37,6 +35,12 @@ index ad01d4fb795ee..5774dc2c5c2bf 100644
  
        /*
         * We may force a getattr if the user cares about atime.
--- 
-2.34.1
-
+@@ -775,7 +772,7 @@ int nfs_getattr(const struct path *path,
+               if (S_ISDIR(inode->i_mode))
+                       stat->blksize = NFS_SERVER(inode)->dtsize;
+       }
+-out:
++
+       trace_nfs_getattr_exit(inode, err);
+       return err;
+ }
index ef0feeaf1e3a7f202ac8f15625dcd2bb421d1c92..0a8de202e31015edda8c5c31a53ddbb56edfa59d 100644 (file)
@@ -34,6 +34,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
 kvm-x86-pmu-use-amd64_raw_event_mask-for-perf_type_r.patch
diff --git a/queue-4.9/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch b/queue-4.9/lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch
new file mode 100644 (file)
index 0000000..e9aaf01
--- /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
+@@ -370,6 +370,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;
+@@ -494,6 +495,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 f1930553b00c8187819c6854d94b4c6d6eff8228..82b05c8bda4d35611c6021419ff4e852118c2831 100644 (file)
@@ -16,14 +16,12 @@ Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
 Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- fs/nfs/inode.c | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
+ fs/nfs/inode.c |    9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
 
-diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
-index 7a94f5a5f8c8c..3f93b659c849a 100644
 --- a/fs/nfs/inode.c
 +++ b/fs/nfs/inode.c
-@@ -661,11 +661,8 @@ int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+@@ -661,11 +661,8 @@ int nfs_getattr(struct vfsmount *mnt, st
  
        trace_nfs_getattr_enter(inode);
        /* Flush out writes to the server in order to update c/mtime.  */
@@ -37,6 +35,12 @@ index 7a94f5a5f8c8c..3f93b659c849a 100644
  
        /*
         * We may force a getattr if the user cares about atime.
--- 
-2.34.1
-
+@@ -693,7 +690,7 @@ int nfs_getattr(struct vfsmount *mnt, st
+               if (S_ISDIR(inode->i_mode))
+                       stat->blksize = NFS_SERVER(inode)->dtsize;
+       }
+-out:
++
+       trace_nfs_getattr_exit(inode, err);
+       return err;
+ }
index 616cde5b5ff5a8bacbbdf2c34a7783d7885256d7..e128133c17b80f0cfa627734e72c4a83de6daa4e 100644 (file)
@@ -26,6 +26,7 @@ asoc-ops-fix-stereo-change-notifications-in-snd_soc_put_volsw_range.patch
 nfs-lookup_directory-is-also-ok-with-symlinks.patch
 edac-fix-calculation-of-returned-address-and-next-offset-in-edac_align_ptr.patch
 i2c-brcmstb-fix-support-for-dsl-and-cm-variants.patch
+lib-iov_iter-initialize-flags-in-new-pipe_buffer.patch
 kvm-x86-pmu-use-amd64_raw_event_mask-for-perf_type_r.patch
 nfs-do-not-report-writeback-errors-in-nfs_getattr.patch
 ata-libata-core-disable-trim-on-m88v29.patch