]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jun 2020 14:39:13 +0000 (16:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jun 2020 14:39:13 +0000 (16:39 +0200)
added patches:
efi-efivars-add-missing-kobject_put-in-sysfs-entry-creation-error-path.patch
x86-reboot-quirks-add-macbook6-1-reboot-quirk.patch

queue-4.14/efi-efivars-add-missing-kobject_put-in-sysfs-entry-creation-error-path.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/x86-reboot-quirks-add-macbook6-1-reboot-quirk.patch [new file with mode: 0644]

diff --git a/queue-4.14/efi-efivars-add-missing-kobject_put-in-sysfs-entry-creation-error-path.patch b/queue-4.14/efi-efivars-add-missing-kobject_put-in-sysfs-entry-creation-error-path.patch
new file mode 100644 (file)
index 0000000..d35b6d7
--- /dev/null
@@ -0,0 +1,39 @@
+From d8bd8c6e2cfab8b78b537715255be8d7557791c0 Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ardb@kernel.org>
+Date: Fri, 22 May 2020 18:15:49 +0200
+Subject: efi/efivars: Add missing kobject_put() in sysfs entry creation error path
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ard Biesheuvel <ardb@kernel.org>
+
+commit d8bd8c6e2cfab8b78b537715255be8d7557791c0 upstream.
+
+The documentation provided by kobject_init_and_add() clearly spells out
+the need to call kobject_put() on the kobject if an error is returned.
+Add this missing call to the error path.
+
+Cc: <stable@vger.kernel.org>
+Reported-by: 亿一 <teroincn@gmail.com>
+Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/firmware/efi/efivars.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/firmware/efi/efivars.c
++++ b/drivers/firmware/efi/efivars.c
+@@ -586,8 +586,10 @@ efivar_create_sysfs_entry(struct efivar_
+       ret = kobject_init_and_add(&new_var->kobj, &efivar_ktype,
+                                  NULL, "%s", short_name);
+       kfree(short_name);
+-      if (ret)
++      if (ret) {
++              kobject_put(&new_var->kobj);
+               return ret;
++      }
+       kobject_uevent(&new_var->kobj, KOBJ_ADD);
+       if (efivar_entry_add(new_var, &efivar_sysfs_list)) {
index 79b08349ac507a7822d514ccd646bf296c670e3d..564ed6118a5fa644515b0d067bfb3071a04ba065 100644 (file)
@@ -18,3 +18,5 @@ mm-add-kvfree_sensitive-for-freeing-sensitive-data-o.patch
 x86_64-fix-jiffies-odr-violation.patch
 x86-pci-mark-intel-c620-mroms-as-having-non-compliant-bars.patch
 x86-speculation-prevent-rogue-cross-process-ssbd-shutdown.patch
+x86-reboot-quirks-add-macbook6-1-reboot-quirk.patch
+efi-efivars-add-missing-kobject_put-in-sysfs-entry-creation-error-path.patch
diff --git a/queue-4.14/x86-reboot-quirks-add-macbook6-1-reboot-quirk.patch b/queue-4.14/x86-reboot-quirks-add-macbook6-1-reboot-quirk.patch
new file mode 100644 (file)
index 0000000..a309f57
--- /dev/null
@@ -0,0 +1,39 @@
+From 140fd4ac78d385e6c8e6a5757585f6c707085f87 Mon Sep 17 00:00:00 2001
+From: Hill Ma <maahiuzeon@gmail.com>
+Date: Sat, 25 Apr 2020 13:06:41 -0700
+Subject: x86/reboot/quirks: Add MacBook6,1 reboot quirk
+
+From: Hill Ma <maahiuzeon@gmail.com>
+
+commit 140fd4ac78d385e6c8e6a5757585f6c707085f87 upstream.
+
+On MacBook6,1 reboot would hang unless parameter reboot=pci is added.
+Make it automatic.
+
+Signed-off-by: Hill Ma <maahiuzeon@gmail.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: stable@vger.kernel.org
+Link: https://lkml.kernel.org/r/20200425200641.GA1554@cslab.localdomain
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/reboot.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/x86/kernel/reboot.c
++++ b/arch/x86/kernel/reboot.c
+@@ -197,6 +197,14 @@ static const struct dmi_system_id reboot
+                       DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5"),
+               },
+       },
++      {       /* Handle problems with rebooting on Apple MacBook6,1 */
++              .callback = set_pci_reboot,
++              .ident = "Apple MacBook6,1",
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "MacBook6,1"),
++              },
++      },
+       {       /* Handle problems with rebooting on Apple MacBookPro5 */
+               .callback = set_pci_reboot,
+               .ident = "Apple MacBookPro5",