]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Feb 2022 09:42:14 +0000 (10:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Feb 2022 09:42:14 +0000 (10:42 +0100)
added patches:
ovl-fix-null-pointer-dereference-in-copy-up-warning.patch

queue-5.16/ovl-fix-null-pointer-dereference-in-copy-up-warning.patch [new file with mode: 0644]
queue-5.16/series

diff --git a/queue-5.16/ovl-fix-null-pointer-dereference-in-copy-up-warning.patch b/queue-5.16/ovl-fix-null-pointer-dereference-in-copy-up-warning.patch
new file mode 100644 (file)
index 0000000..f3d0c2c
--- /dev/null
@@ -0,0 +1,41 @@
+From 4ee7e4a6c9b298da44029ed9ec8ed23ae49cc209 Mon Sep 17 00:00:00 2001
+From: Christoph Fritz <chf.fritz@googlemail.com>
+Date: Wed, 12 Jan 2022 19:33:21 +0100
+Subject: ovl: fix NULL pointer dereference in copy up warning
+
+From: Christoph Fritz <chf.fritz@googlemail.com>
+
+commit 4ee7e4a6c9b298da44029ed9ec8ed23ae49cc209 upstream.
+
+This patch is fixing a NULL pointer dereference to get a recently
+introduced warning message working.
+
+Fixes: 5b0a414d06c3 ("ovl: fix filattr copy-up failure")
+Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
+Cc: <stable@vger.kernel.org> # v5.15
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/overlayfs/copy_up.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/overlayfs/copy_up.c
++++ b/fs/overlayfs/copy_up.c
+@@ -145,7 +145,7 @@ static int ovl_copy_fileattr(struct inod
+               if (err == -ENOTTY || err == -EINVAL)
+                       return 0;
+               pr_warn("failed to retrieve lower fileattr (%pd2, err=%i)\n",
+-                      old, err);
++                      old->dentry, err);
+               return err;
+       }
+@@ -178,7 +178,7 @@ static int ovl_copy_fileattr(struct inod
+                       return 0;
+               }
+               pr_warn("failed to retrieve upper fileattr (%pd2, err=%i)\n",
+-                      new, err);
++                      new->dentry, err);
+               return err;
+       }
index 697f89c91f1dbf14c507bf6a395996d439cecc73..850ad13aacbc632a3a27b9137f6210c99a4c02a4 100644 (file)
@@ -41,3 +41,4 @@ e1000e-handshake-with-csme-starts-from-adl-platforms.patch
 af_packet-fix-data-race-in-packet_setsockopt-packet_setsockopt.patch
 tcp-fix-mem-under-charging-with-zerocopy-sendmsg.patch
 tcp-add-missing-tcp_skb_can_collapse-test-in-tcp_shift_skb_data.patch
+ovl-fix-null-pointer-dereference-in-copy-up-warning.patch