linux/drivers/base
Saravana Kannan d359886a7a driver core: Release all resources during unbind before updating device links
commit 2e84dc3792 upstream.

This commit fixes a bug in commit 9ed9895370 ("driver core: Functional
dependencies tracking support") where the device link status was
incorrectly updated in the driver unbind path before all the device's
resources were released.

Fixes: 9ed9895370 ("driver core: Functional dependencies tracking support")
Cc: stable <stable@kernel.org>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Closes: https://lore.kernel.org/all/20231014161721.f4iqyroddkcyoefo@pengutronix.de/
Signed-off-by: Saravana Kannan <saravanak@google.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: James Clark <james.clark@arm.com>
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231018013851.3303928-1-saravanak@google.com
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-08 08:44:22 +01:00
..
firmware_loader firmware_loader: use kernel credentials when reading firmware 2022-05-25 09:14:38 +02:00
power PM: runtime: Add pm_runtime_get_if_active() 2023-08-30 16:27:12 +02:00
regmap regmap: prevent noinc writes from clobbering cache 2023-11-20 10:30:15 +01:00
test driver core: test_async: fix an error code 2023-09-23 10:59:50 +02:00
arch_topology.c arm64: topology: move store_cpu_topology() to shared code 2022-10-29 10:20:36 +02:00
attribute_container.c
base.h driver/core: Convert to use built-in RCU list checking 2019-08-13 14:28:47 -07:00
bus.c driver: base: fix UAF when driver_attach failed 2022-06-14 18:11:54 +02:00
cacheinfo.c drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions 2022-01-16 09:15:38 +01:00
class.c class: fix possible memory leak in __class_register() 2023-01-18 11:41:21 +01:00
component.c component: Silence bind error on -EPROBE_DEFER 2020-05-27 17:46:31 +02:00
container.c
core.c drivers: core: fix kernel-doc markup for dev_err_probe() 2023-08-11 11:54:02 +02:00
cpu.c x86/speculation: Add Gather Data Sampling mitigation 2023-08-08 19:56:35 +02:00
dd.c driver core: Release all resources during unbind before updating device links 2023-12-08 08:44:22 +01:00
devcon.c Merge generic_lookup_helpers into usb-next 2019-09-03 17:11:07 +02:00
devcoredump.c devcoredump: fix typo in comment 2019-08-15 17:38:11 +02:00
devres.c drivers/base/devres: introduce devm_release_action() 2019-06-13 17:34:56 -10:00
devtmpfs.c devtmpfs regression fix: reconfigure on each mount 2022-01-20 09:19:17 +01:00
driver.c driver: platform: Add helper for safer setting of driver_override 2023-11-08 11:23:39 +01:00
firmware.c
hypervisor.c
init.c
isa.c
Kconfig base: arch_topology: update Kconfig help description 2019-07-22 09:36:44 -07:00
Makefile
map.c
memory.c drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions 2022-01-16 09:15:38 +01:00
module.c
node.c drivers/base/node.c: fix compaction sysfs file leak 2022-06-14 18:11:41 +02:00
pinctrl.c
platform-msi.c
platform.c driver: platform: Add helper for safer setting of driver_override 2023-11-08 11:23:39 +01:00
property.c device property: Introduce fwnode_find_reference() 2019-06-03 10:55:38 +02:00
soc.c drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions 2022-01-16 09:15:38 +01:00
swnode.c software node: Fix node registration 2021-03-17 17:03:48 +01:00
syscore.c treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively 2019-04-09 14:19:06 +02:00
topology.c topology: Create core_cpus and die_cpus sysfs attributes 2019-05-23 10:08:34 +02:00
transport_class.c