linux-stable/drivers/base
Chen Zhongjin 704a423c93 driver core: Fix test_async_probe_init saves device in wrong array
[ Upstream commit 9be182da0a ]

In test_async_probe_init, second set of asynchronous devices are saved
in sync_dev[sync_id], which should be async_dev[async_id].
This makes these devices not unregistered when exit.

> modprobe test_async_driver_probe && \
> modprobe -r test_async_driver_probe && \
> modprobe test_async_driver_probe
 ...
> sysfs: cannot create duplicate filename '/devices/platform/test_async_driver.4'
> kobject_add_internal failed for test_async_driver.4 with -EEXIST,
  don't try to register things with the same name in the same directory.

Fixes: 57ea974fb8 ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity")
Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
Link: https://lore.kernel.org/r/20221125063541.241328-1-chenzhongjin@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-01 08:23:15 +01:00
..
firmware_loader firmware_loader: use kernel credentials when reading firmware 2022-05-18 10:23:46 +02:00
power PM: runtime: Do not call __rpm_callback() from rpm_idle() 2023-01-14 10:15:21 +01:00
regmap regmap-irq: Fix a bug in regmap_irq_enable() for type_in_mask chips 2022-06-29 08:59:49 +02:00
test driver core: Fix test_async_probe_init saves device in wrong array 2023-02-01 08:23:15 +01:00
arch_topology.c arm64: topology: move store_cpu_topology() to shared code 2022-10-30 09:41:19 +01:00
attribute_container.c
base.h
bus.c driver: base: fix UAF when driver_attach failed 2022-06-14 18:32:34 +02:00
cacheinfo.c
class.c class: fix possible memory leak in __class_register() 2023-01-14 10:15:54 +01:00
component.c
container.c
core.c PM: runtime: Redefine pm_runtime_release_supplier() 2022-07-12 16:32:18 +02:00
cpu.c x86/bugs: Report AMD retbleed vulnerability 2022-07-25 11:26:40 +02:00
dd.c driver core: Fix bus_type.match() error handling in __driver_attach() 2023-01-14 10:16:36 +01:00
devcoredump.c
devres.c
devtmpfs.c devtmpfs regression fix: reconfigure on each mount 2022-01-20 09:17:49 +01:00
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c drivers/base/memory: fix an unlikely reference counting issue in __add_memory_block() 2022-06-09 10:21:16 +02:00
module.c
node.c drivers/base/node.c: fix compaction sysfs file leak 2022-06-09 10:21:16 +02:00
pinctrl.c
platform-msi.c
platform.c
property.c device property: Fix fwnode_graph_devcon_match() fwnode leak 2022-01-27 10:54:25 +01:00
soc.c
swnode.c software node: fix wrong node passed to find nargs_prop 2022-01-27 10:53:59 +01:00
syscore.c
topology.c
transport_class.c