]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 19:30:18 +0000 (20:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 19:30:18 +0000 (20:30 +0100)
added patches:
efivarfs-replace-invalid-slashes-with-exclamation-marks-in-dentries.patch
powerpc-powernv-opal-dump-use-irq_handled-instead-of-numbers-in-interrupt-handler.patch

queue-4.9/efivarfs-replace-invalid-slashes-with-exclamation-marks-in-dentries.patch [new file with mode: 0644]
queue-4.9/powerpc-powernv-opal-dump-use-irq_handled-instead-of-numbers-in-interrupt-handler.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/efivarfs-replace-invalid-slashes-with-exclamation-marks-in-dentries.patch b/queue-4.9/efivarfs-replace-invalid-slashes-with-exclamation-marks-in-dentries.patch
new file mode 100644 (file)
index 0000000..8c07996
--- /dev/null
@@ -0,0 +1,40 @@
+From 336af6a4686d885a067ecea8c3c3dd129ba4fc75 Mon Sep 17 00:00:00 2001
+From: Michael Schaller <misch@google.com>
+Date: Fri, 25 Sep 2020 09:45:02 +0200
+Subject: efivarfs: Replace invalid slashes with exclamation marks in dentries.
+
+From: Michael Schaller <misch@google.com>
+
+commit 336af6a4686d885a067ecea8c3c3dd129ba4fc75 upstream.
+
+Without this patch efivarfs_alloc_dentry creates dentries with slashes in
+their name if the respective EFI variable has slashes in its name. This in
+turn causes EIO on getdents64, which prevents a complete directory listing
+of /sys/firmware/efi/efivars/.
+
+This patch replaces the invalid shlashes with exclamation marks like
+kobject_set_name_vargs does for /sys/firmware/efi/vars/ to have consistently
+named dentries under /sys/firmware/efi/vars/ and /sys/firmware/efi/efivars/.
+
+Signed-off-by: Michael Schaller <misch@google.com>
+Link: https://lore.kernel.org/r/20200925074502.150448-1-misch@google.com
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: dann frazier <dann.frazier@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/efivarfs/super.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/fs/efivarfs/super.c
++++ b/fs/efivarfs/super.c
+@@ -146,6 +146,9 @@ static int efivarfs_callback(efi_char16_
+       name[len + EFI_VARIABLE_GUID_LEN+1] = '\0';
++      /* replace invalid slashes like kobject_set_name_vargs does for /sys/firmware/efi/vars. */
++      strreplace(name, '/', '!');
++
+       inode = efivarfs_get_inode(sb, d_inode(root), S_IFREG | 0644, 0,
+                                  is_removable);
+       if (!inode)
diff --git a/queue-4.9/powerpc-powernv-opal-dump-use-irq_handled-instead-of-numbers-in-interrupt-handler.patch b/queue-4.9/powerpc-powernv-opal-dump-use-irq_handled-instead-of-numbers-in-interrupt-handler.patch
new file mode 100644 (file)
index 0000000..5080827
--- /dev/null
@@ -0,0 +1,59 @@
+From b29336c0e1785a28bc40a9fd47c2321671e9792e Mon Sep 17 00:00:00 2001
+From: Mukesh Ojha <mukesh02@linux.vnet.ibm.com>
+Date: Mon, 20 Feb 2017 18:52:11 +0530
+Subject: powerpc/powernv/opal-dump : Use IRQ_HANDLED instead of numbers in interrupt handler
+
+From: Mukesh Ojha <mukesh02@linux.vnet.ibm.com>
+
+commit b29336c0e1785a28bc40a9fd47c2321671e9792e upstream.
+
+Fixes: 8034f715f ("powernv/opal-dump: Convert to irq domain")
+
+Converts all the return explicit number to a more proper IRQ_HANDLED,
+which looks proper incase of interrupt handler returning case.
+
+Here, It also removes error message like "nobody cared" which was
+getting unveiled while returning -1 or 0 from handler.
+
+Signed-off-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com>
+Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Cc: Kamal Mostafa <kamal@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/platforms/powernv/opal-dump.c |    9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+--- a/arch/powerpc/platforms/powernv/opal-dump.c
++++ b/arch/powerpc/platforms/powernv/opal-dump.c
+@@ -385,13 +385,12 @@ static irqreturn_t process_dump(int irq,
+ {
+       int rc;
+       uint32_t dump_id, dump_size, dump_type;
+-      struct dump_obj *dump;
+       char name[22];
+       struct kobject *kobj;
+       rc = dump_read_info(&dump_id, &dump_size, &dump_type);
+       if (rc != OPAL_SUCCESS)
+-              return rc;
++              return IRQ_HANDLED;
+       sprintf(name, "0x%x-0x%x", dump_type, dump_id);
+@@ -403,12 +402,10 @@ static irqreturn_t process_dump(int irq,
+       if (kobj) {
+               /* Drop reference added by kset_find_obj() */
+               kobject_put(kobj);
+-              return 0;
++              return IRQ_HANDLED;
+       }
+-      dump = create_dump_obj(dump_id, dump_size, dump_type);
+-      if (!dump)
+-              return -1;
++      create_dump_obj(dump_id, dump_size, dump_type);
+       return IRQ_HANDLED;
+ }
index ac83c172e2d14cb31833483e20689611613abd2c..8e061647c55f9112ec06973860b1a20ee829cfaa 100644 (file)
@@ -1,2 +1,4 @@
 sunrpc-econnrefused-should-cause-a-rebind.patch
 scripts-setlocalversion-make-git-describe-output-more-reliable.patch
+powerpc-powernv-opal-dump-use-irq_handled-instead-of-numbers-in-interrupt-handler.patch
+efivarfs-replace-invalid-slashes-with-exclamation-marks-in-dentries.patch