Linux v4.15.7

This commit is contained in:
Laura Abbott 2018-02-28 09:23:45 -08:00
parent 56929c445d
commit c895e3e2a6
3 changed files with 63 additions and 6 deletions

View File

@ -0,0 +1,54 @@
From 174134ac760275457bb0d1560a0dbe6cf8a12ad6 Mon Sep 17 00:00:00 2001
From: Corey Minyard <cminyard@mvista.com>
Date: Mon, 27 Nov 2017 08:18:33 -0600
Subject: [PATCH] ipmi_si: Fix error handling of platform device
Cleanup of platform devices created by the IPMI driver was not
being done correctly and could result in a memory leak. So
create a local boolean to know how to clean up those platform
devices.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
drivers/char/ipmi/ipmi_si_intf.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 71fad747c0c7..7499b0cd8326 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2045,6 +2045,7 @@ static int try_smi_init(struct smi_info *new_smi)
int rv = 0;
int i;
char *init_name = NULL;
+ bool platform_device_registered = false;
pr_info(PFX "Trying %s-specified %s state machine at %s address 0x%lx, slave address 0x%x, irq %d\n",
ipmi_addr_src_to_str(new_smi->io.addr_source),
@@ -2173,6 +2174,7 @@ static int try_smi_init(struct smi_info *new_smi)
rv);
goto out_err;
}
+ platform_device_registered = true;
}
dev_set_drvdata(new_smi->io.dev, new_smi);
@@ -2279,10 +2281,11 @@ static int try_smi_init(struct smi_info *new_smi)
}
if (new_smi->pdev) {
- platform_device_unregister(new_smi->pdev);
+ if (platform_device_registered)
+ platform_device_unregister(new_smi->pdev);
+ else
+ platform_device_put(new_smi->pdev);
new_smi->pdev = NULL;
- } else if (new_smi->pdev) {
- platform_device_put(new_smi->pdev);
}
kfree(init_name);
--
2.14.3

View File

@ -54,7 +54,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
%define stable_update 6
%define stable_update 7
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev %{stable_update}
@ -580,10 +580,6 @@ Patch307: arm-dts-imx6qdl-udoo-Disable-usbh1-to-avoid-kernel-hang.patch
# Fix USB on the RPi https://patchwork.kernel.org/patch/9879371/
Patch308: bcm283x-dma-mapping-skip-USB-devices-when-configuring-DMA-during-probe.patch
# Found on the db410c on 4.15.4
# https://www.spinics.net/lists/arm-kernel/msg636489.html
Patch320: arm64-mm-dont-write-garbage-into-TTBR1_EL1-register.patch
# https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=synquacer-netsec
Patch330: arm64-socionext-96b-enablement.patch
@ -634,6 +630,9 @@ Patch652: iwlwifi-mvn.patch
# CVE-2018-1000026 rhbz 1541846 1546744
Patch653: CVE-2018-1000026.patch
# rhbz 1549316
Patch654: 0001-ipmi_si-Fix-error-handling-of-platform-device.patch
# END OF PATCH DEFINITIONS
%endif
@ -1920,6 +1919,10 @@ fi
#
#
%changelog
* Wed Feb 28 2018 Laura Abbott <labbott@redhat.com> - 4.15.7-200
- Linux v4.15.7
- Fix IPMI crash (rhbz 1549316)
* Mon Feb 26 2018 Laura Abbott <labbott@redhat.com> - 4.15.6-200
- Linux v4.15.6

View File

@ -1,2 +1,2 @@
SHA512 (linux-4.15.tar.xz) = c00d92659df815a53dcac7dde145b742b1f20867d380c07cb09ddb3295d6ff10f8931b21ef0b09d7156923a3957b39d74d87c883300173b2e20690d2b4ec35ea
SHA512 (patch-4.15.6.xz) = 2f69b715c689d6ff5142cc1eb968364e2e8e38224feed2cd60afe490c8e62fb8af1077a97ba24b6b74a8b18869dbee5f8b6a62df7656495600e263b19229c85d
SHA512 (patch-4.15.7.xz) = 4215a356a61c3af20352fd60f3ec4e4a74a3d4d6223c7bd5c1b8283bc4d786a5e1c29a770518cb6a136f42841c637648835a54a46f11e552d1aa7b867999ef1a