Ubuntu-focal-kernel/drivers/base
Chen Zhongjin c3657eee31 driver core: Fix test_async_probe_init saves device in wrong array
BugLink: https://bugs.launchpad.net/bugs/2011226

[ Upstream commit 9be182da0a7526f1b9a3777a336f83baa2e64d23 ]

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>
Signed-off-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
2023-03-21 10:08:58 +01:00
..
firmware_loader
power
regmap
test driver core: Fix test_async_probe_init saves device in wrong array 2023-03-21 10:08:58 +01:00
Kconfig
Makefile
arch_topology.c
attribute_container.c
base.h
bus.c
cacheinfo.c
class.c class: fix possible memory leak in __class_register() 2023-02-01 15:22:51 +01:00
component.c
container.c
core.c
cpu.c
dd.c driver core: Fix bus_type.match() error handling in __driver_attach() 2023-02-01 15:23:43 +01:00
devcon.c
devcoredump.c
devres.c
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
map.c
memory.c
module.c
node.c
pinctrl.c
platform-msi.c
platform.c
property.c
soc.c
swnode.c
syscore.c
topology.c
transport_class.c