alistair23-linux/drivers/acpi
Prarit Bhargava 7e700d2c59 acpi/nfit: Fix memory corruption/Unregister mce decoder on failure
nfit_init() calls nfit_mce_register() on module load.  When the module
load fails the nfit mce decoder is not unregistered.  The module's
memory is freed leaving the decoder chain referencing junk.  This will
cause panics as future registrations will reference the free'd memory.

Unregister the nfit mce decoder on module init failure.

[v2]: register and then unregister mce handler to avoid losing mce events
[v3]: also cleanup nfit workqueue

Fixes: 6839a6d96f ("nfit: do an ARS scrub on hitting a latent media error")
Cc: <stable@vger.kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>
Cc: Linda Knippers <linda.knippers@hpe.com>
Cc: lszubowi@redhat.com
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2017-07-17 11:43:58 -07:00
..
acpica Merge branches 'acpi-pmic', 'acpi-misc' and 'acpi-tables' 2017-07-03 14:25:11 +02:00
apei arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
arm64 IOMMU Updates for Linux v4.13 2017-07-12 10:00:04 -07:00
dptf ACPI / DPTF: constify attribute_group structures 2017-07-04 22:15:28 +02:00
nfit acpi/nfit: Fix memory corruption/Unregister mce decoder on failure 2017-07-17 11:43:58 -07:00
pmic ACPI / PMIC: xpower: Add support for the GPI1 regulator to the OpRegion handler 2017-06-22 02:15:05 +02:00
x86 ACPI / x86: Add KIOX000A accelerometer on GPD win to always_present_ids array 2017-07-12 13:26:13 +02:00
ac.c
acpi_amba.c
acpi_apd.c More ACPI updates for v4.12-rc1 2017-05-10 09:35:42 -07:00
acpi_cmos_rtc.c
acpi_configfs.c ACPI: configfs: Unload SSDT on configfs entry removal 2017-06-22 02:43:12 +02:00
acpi_dbg.c ACPI: fix whitespace in pr_fmt() to align log entries 2017-06-22 02:18:20 +02:00
acpi_extlog.c ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() 2017-06-07 12:20:49 +02:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpss.c ACPI / LPSS: constify attribute_group structures 2017-07-04 22:15:24 +02:00
acpi_memhotplug.c
acpi_pad.c
acpi_platform.c
acpi_pnp.c
acpi_processor.c
acpi_video.c
acpi_watchdog.c
battery.c ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle 2017-06-15 00:55:44 +02:00
battery.h
bgrt.c ACPI: BGRT: constify attribute_group structures 2017-07-04 22:15:20 +02:00
blacklist.c
bus.c Merge branches 'acpi-spcr', 'acpi-osi', 'acpi-bus', 'acpi-scan' and 'acpi-misc' 2017-07-10 22:46:21 +02:00
button.c ACPI updates for v4.13-rc1 2017-07-04 14:16:49 -07:00
cm_sbs.c
container.c
cppc_acpi.c scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
custom_method.c
debugfs.c
device_pm.c Device properties framework updates for v4.13-rc1 2017-07-10 15:23:45 -07:00
device_sysfs.c
dock.c
ec.c Merge branches 'acpi-ec', 'acpi-irq' and 'acpi-quirks' 2017-07-14 13:17:53 +02:00
ec_sys.c
event.c
evged.c
fan.c
glue.c IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
hed.c
internal.h Device properties framework updates for v4.13-rc1 2017-07-10 15:23:45 -07:00
ioapic.c ACPI: fix whitespace in pr_fmt() to align log entries 2017-06-22 02:18:20 +02:00
irq.c ACPI / irq: Fix return code of acpi_gsi_to_irq() 2017-07-12 13:11:49 +02:00
Kconfig - New Drivers 2017-05-03 12:16:25 -07:00
Makefile Merge branches 'acpi-soc', 'acpi-bus', 'acpi-pmic' and 'acpi-power' 2017-05-09 23:23:02 +02:00
numa.c
nvs.c
osi.c ACPI / osi: Make local function acpi_osi_dmi_linux() static 2017-07-04 21:35:19 +02:00
osl.c
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c Power management updates for v4.13-rc1 2017-07-04 13:39:41 -07:00
pci_slot.c
power.c ACPI / power: constify attribute_group structures 2017-07-04 22:15:14 +02:00
proc.c ACPI / PM: Drop run_wake from struct acpi_device_wakeup_flags 2017-06-28 01:52:15 +02:00
processor_core.c
processor_driver.c ACPI/processor: Use cpu_hotplug_disable() instead of get_online_cpus() 2017-05-26 10:10:44 +02:00
processor_idle.c
processor_pdc.c
processor_perflib.c
processor_thermal.c
processor_throttling.c acpi/processor: Prevent cpu hotplug deadlock 2017-05-26 10:10:47 +02:00
property.c device property: Introduce fwnode_device_is_available() 2017-06-22 02:55:34 +02:00
reboot.c
resource.c
sbs.c
sbshc.c
sbshc.h
scan.c Device properties framework updates for v4.13-rc1 2017-07-10 15:23:45 -07:00
sleep.c ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems 2017-06-23 15:24:32 +02:00
sleep.h ACPI / power: Delay turning off unused power resources after suspend 2017-05-01 23:11:21 +02:00
spcr.c ACPI: SPCR: Workaround for APM X-Gene 8250 UART 32-alignment errata 2017-07-04 21:29:38 +02:00
sysfs.c Merge branches 'acpi-button', 'acpica' and 'acpi-sysfs' 2017-06-03 00:03:29 +02:00
tables.c Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 20:51:12 -07:00
thermal.c
utils.c ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() 2017-06-07 12:20:49 +02:00
video_detect.c ACPI / video: Add quirks for the Dell Precision 7510 2017-06-28 23:41:03 +02:00
wakeup.c