From: Greg Kroah-Hartman Date: Thu, 29 Oct 2020 19:30:18 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.19.154~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b51e22d4dcf07c230e46e49aca2f3b56d60f5b2;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches 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 --- 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 index 00000000000..8c07996e8f8 --- /dev/null +++ b/queue-4.9/efivarfs-replace-invalid-slashes-with-exclamation-marks-in-dentries.patch @@ -0,0 +1,40 @@ +From 336af6a4686d885a067ecea8c3c3dd129ba4fc75 Mon Sep 17 00:00:00 2001 +From: Michael Schaller +Date: Fri, 25 Sep 2020 09:45:02 +0200 +Subject: efivarfs: Replace invalid slashes with exclamation marks in dentries. + +From: Michael Schaller + +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 +Link: https://lore.kernel.org/r/20200925074502.150448-1-misch@google.com +Signed-off-by: Ard Biesheuvel +Signed-off-by: dann frazier +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..5080827b361 --- /dev/null +++ b/queue-4.9/powerpc-powernv-opal-dump-use-irq_handled-instead-of-numbers-in-interrupt-handler.patch @@ -0,0 +1,59 @@ +From b29336c0e1785a28bc40a9fd47c2321671e9792e Mon Sep 17 00:00:00 2001 +From: Mukesh Ojha +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 + +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 +Reviewed-by: Vasant Hegde +Signed-off-by: Michael Ellerman +Cc: Kamal Mostafa +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + } diff --git a/queue-4.9/series b/queue-4.9/series index ac83c172e2d..8e061647c55 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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