Hans de Goede
a826af1dea
ACPI: scan: Make acpi_bus_get_device() clear return pointer on error
...
commit 78a18fec5258c8df9435399a1ea022d73d3eceb9 upstream.
Set the acpi_device pointer which acpi_bus_get_device() returns-by-
reference to NULL on errors.
We've recently had 2 cases where callers of acpi_bus_get_device()
did not properly error check the return value, so set the returned-
by-reference acpi_device pointer to NULL, because at least some
callers of acpi_bus_get_device() expect that to be done on errors.
[ rjw: This issue was exposed by commit 71da201f38df ("ACPI: scan:
Defer enumeration of devices with _DEP lists") which caused it to
be much more likely to occur on some systems, but the real defect
had been introduced by an earlier commit. ]
Fixes: 40e7fcb192 ("ACPI: Add _DEP support to fix battery issue on Asus T100TA")
Fixes: bcfcd409d4 ("usb: split code locating ACPI companion into port and device")
Reported-by: Pierre-Louis Bossart <[email protected] >
Tested-by: Pierre-Louis Bossart <[email protected] >
Diagnosed-by: Rafael J. Wysocki <[email protected] >
Signed-off-by: Hans de Goede <[email protected] >
Cc: All applicable <[email protected] >
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2021-01-27 11:47:40 +01:00
..
acpica
ACPICA: Do not increment operation_region reference counts for field units
2020-08-19 08:16:05 +02:00
apei
x86/mm: split vmalloc_sync_all()
2020-03-25 08:25:58 +01:00
arm64
ACPI/IORT: Fix PMCG node single ID mapping handling
2020-06-22 09:30:54 +02:00
dptf
hmat
ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3
2020-11-05 11:43:19 +01:00
nfit
ACPI: NFIT: Fix comparison to '-ENXIO'
2020-11-10 12:37:31 +01:00
pmic
x86
ac.c
acpi_adxl.c
acpi_amba.c
acpi_apd.c
i2c: imx: ACPI support for NXP i2c controller
2019-09-13 15:12:38 +01:00
acpi_cmos_rtc.c
acpi_configfs.c
ACPI: configfs: Disallow loading ACPI tables when locked down
2020-06-30 15:37:07 -04:00
acpi_dbg.c
ACPI: debug: don't allow debugging when ACPI is disabled
2020-11-05 11:43:25 +01:00
acpi_extlog.c
ACPI / extlog: Check for RDMSR failure
2020-11-05 11:43:24 +01:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c
acpi_lpss.c
ACPI: LPSS: Add dmi quirk for skipping _DEP check for some device-links
2019-12-17 19:56:32 +01:00
acpi_memhotplug.c
acpi_pad.c
acpi_platform.c
ACPI: platform: Unregister stale platform devices
2020-01-26 10:01:04 +01:00
acpi_pnp.c
ACPI: PNP: compare the string length in the matching_id()
2020-12-30 11:51:32 +01:00
acpi_processor.c
acpi_tad.c
acpi_video.c
acpi_watchdog.c
ACPI: watchdog: Allow disabling WDAT at boot
2020-03-21 08:11:47 +01:00
battery.c
ACPI / battery: Deal better with neither design nor full capacity not being reported
2020-02-11 04:35:20 -08:00
bgrt.c
blacklist.c
bus.c
ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data()
2019-12-17 19:56:34 +01:00
button.c
ACPI: button: Add DMI quirk for Medion Akoya E2228T
2020-11-24 13:29:00 +01:00
cm_sbs.c
container.c
cppc_acpi.c
ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe()
2020-06-17 16:40:28 +02:00
custom_method.c
Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
2019-09-28 08:14:15 -07:00
debugfs.c
device_pm.c
PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()
2020-12-30 11:51:32 +01:00
device_sysfs.c
dock.c
ec.c
ACPI: EC: PM: Drop ec_no_wakeup check from acpi_ec_dispatch_gpe()
2020-11-05 11:43:25 +01:00
ec_sys.c
event.c
evged.c
ACPI: GED: fix -Wformat
2020-11-22 10:14:12 +01:00
fan.c
glue.c
hed.c
internal.h
ACPI: scan: Harden acpi_device_add() against device ID overflows
2021-01-19 18:26:12 +01:00
ioapic.c
irq.c
Kconfig
Makefile
ACPI: Always build evged in
2020-10-17 10:11:22 +02:00
numa.c
ACPI: Add out of bounds and numa_off protections to pxm_to_node()
2020-11-05 11:43:18 +01:00
nvs.c
osi.c
osl.c
ACPI: OSL: only free map once in osl.c
2019-12-17 19:56:33 +01:00
pci_irq.c
ACPI / PCI: fix acpi_pci_irq_enable() memory leak
2019-09-03 09:41:25 +02:00
pci_link.c
pci_mcfg.c
pci_root.c
pci_slot.c
power.c
pptt.c
proc.c
processor_core.c
processor_driver.c
cpufreq: Use per-policy frequency QoS
2019-10-21 02:05:21 +02:00
processor_idle.c
processor_pdc.c
processor_perflib.c
ACPI: processor: Add QoS requests for all CPUs
2019-10-25 11:33:48 +02:00
processor_thermal.c
ACPI: processor: Add QoS requests for all CPUs
2019-10-25 11:33:48 +02:00
processor_throttling.c
x86: ACPI: fix CPU hotplug deadlock
2020-04-23 10:36:38 +02:00
property.c
Char/Misc driver patches for 5.4-rc1
2019-09-18 11:14:31 -07:00
reboot.c
resource.c
Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"
2020-12-30 11:51:32 +01:00
sbs.c
sbshc.c
sbshc.h
scan.c
ACPI: scan: Make acpi_bus_get_device() clear return pointer on error
2021-01-27 11:47:40 +01:00
sleep.c
ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive
2020-05-27 17:46:10 +02:00
sleep.h
ACPI: PM: Add acpi_[un]register_wakeup_handler()
2020-04-13 10:48:08 +02:00
spcr.c
sysfs.c
ACPI: sysfs: Fix pm_profile_attr type
2020-06-30 15:37:06 -04:00
tables.c
Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
2019-09-28 08:14:15 -07:00
thermal.c
utils.c
video_detect.c
ACPI: video: use ACPI backlight for HP 635 Notebook
2020-11-05 11:43:25 +01:00
wakeup.c
ACPI: PM: Add acpi_[un]register_wakeup_handler()
2020-04-13 10:48:08 +02:00