]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Apr 2023 13:14:52 +0000 (15:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Apr 2023 13:14:52 +0000 (15:14 +0200)
added patches:
purgatory-fix-disabling-debug-info.patch
virtiofs-clean-up-error-handling-in-virtio_fs_get_tree.patch

queue-5.10/purgatory-fix-disabling-debug-info.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/virtiofs-clean-up-error-handling-in-virtio_fs_get_tree.patch [new file with mode: 0644]

diff --git a/queue-5.10/purgatory-fix-disabling-debug-info.patch b/queue-5.10/purgatory-fix-disabling-debug-info.patch
new file mode 100644 (file)
index 0000000..a5dc677
--- /dev/null
@@ -0,0 +1,37 @@
+From d83806c4c0cccc0d6d3c3581a11983a9c186a138 Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Sun, 26 Mar 2023 18:21:21 +0000
+Subject: purgatory: fix disabling debug info
+
+From: Alyssa Ross <hi@alyssa.is>
+
+commit d83806c4c0cccc0d6d3c3581a11983a9c186a138 upstream.
+
+Since 32ef9e5054ec, -Wa,-gdwarf-2 is no longer used in KBUILD_AFLAGS.
+Instead, it includes -g, the appropriate -gdwarf-* flag, and also the
+-Wa versions of both of those if building with Clang and GNU as.  As a
+result, debug info was being generated for the purgatory objects, even
+though the intention was that it not be.
+
+Fixes: 32ef9e5054ec ("Makefile.debug: re-enable debug info for .S files")
+Signed-off-by: Alyssa Ross <hi@alyssa.is>
+Cc: stable@vger.kernel.org
+Acked-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/purgatory/Makefile |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/arch/x86/purgatory/Makefile
++++ b/arch/x86/purgatory/Makefile
+@@ -64,8 +64,7 @@ CFLAGS_sha256.o                      += $(PURGATORY_CFLAGS)
+ CFLAGS_REMOVE_string.o                += $(PURGATORY_CFLAGS_REMOVE)
+ CFLAGS_string.o                       += $(PURGATORY_CFLAGS)
+-AFLAGS_REMOVE_setup-x86_$(BITS).o     += -Wa,-gdwarf-2
+-AFLAGS_REMOVE_entry64.o                       += -Wa,-gdwarf-2
++asflags-remove-y              += -g -Wa,-gdwarf-2
+ $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
+               $(call if_changed,ld)
index 6366a591e2363deb3c9895dd3a1c0890db2df6ff..f4aad3edb46b98eb29cf938f2c884a4293a428ba 100644 (file)
@@ -45,3 +45,5 @@ sched-uclamp-fix-a-uninitialized-variable-warnings.patch
 sched-fair-fixes-for-capacity-inversion-detection.patch
 mips-define-runtime_discard_exit-in-ld-script.patch
 docs-futex-fix-kernel-doc-references-after-code-split-up-preparation.patch
+purgatory-fix-disabling-debug-info.patch
+virtiofs-clean-up-error-handling-in-virtio_fs_get_tree.patch
diff --git a/queue-5.10/virtiofs-clean-up-error-handling-in-virtio_fs_get_tree.patch b/queue-5.10/virtiofs-clean-up-error-handling-in-virtio_fs_get_tree.patch
new file mode 100644 (file)
index 0000000..91bb32b
--- /dev/null
@@ -0,0 +1,62 @@
+From 833c5a42e28beeefa1f9bd476a63fe8050c1e8ca Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@redhat.com>
+Date: Wed, 11 Nov 2020 17:22:32 +0100
+Subject: virtiofs: clean up error handling in virtio_fs_get_tree()
+
+From: Miklos Szeredi <mszeredi@redhat.com>
+
+commit 833c5a42e28beeefa1f9bd476a63fe8050c1e8ca upstream.
+
+Avoid duplicating error cleanup.
+
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Yang Bo <yb203166@antfin.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/fuse/virtio_fs.c |   25 ++++++++++++-------------
+ 1 file changed, 12 insertions(+), 13 deletions(-)
+
+--- a/fs/fuse/virtio_fs.c
++++ b/fs/fuse/virtio_fs.c
+@@ -1440,22 +1440,14 @@ static int virtio_fs_get_tree(struct fs_
+               return -EINVAL;
+       }
++      err = -ENOMEM;
+       fc = kzalloc(sizeof(struct fuse_conn), GFP_KERNEL);
+-      if (!fc) {
+-              mutex_lock(&virtio_fs_mutex);
+-              virtio_fs_put(fs);
+-              mutex_unlock(&virtio_fs_mutex);
+-              return -ENOMEM;
+-      }
++      if (!fc)
++              goto out_err;
+       fm = kzalloc(sizeof(struct fuse_mount), GFP_KERNEL);
+-      if (!fm) {
+-              mutex_lock(&virtio_fs_mutex);
+-              virtio_fs_put(fs);
+-              mutex_unlock(&virtio_fs_mutex);
+-              kfree(fc);
+-              return -ENOMEM;
+-      }
++      if (!fm)
++              goto out_err;
+       fuse_conn_init(fc, fm, fsc->user_ns, &virtio_fs_fiq_ops, fs);
+       fc->release = fuse_free_conn;
+@@ -1483,6 +1475,13 @@ static int virtio_fs_get_tree(struct fs_
+       WARN_ON(fsc->root);
+       fsc->root = dget(sb->s_root);
+       return 0;
++
++out_err:
++      kfree(fc);
++      mutex_lock(&virtio_fs_mutex);
++      virtio_fs_put(fs);
++      mutex_unlock(&virtio_fs_mutex);
++      return err;
+ }
+ static const struct fs_context_operations virtio_fs_context_ops = {