linux-uconsole/drivers/base
Isaac J. Manjarres 28e71fd8d5 driver core: Fix bus_type.match() error handling in __driver_attach()
commit 27c0d21734 upstream.

When a driver registers with a bus, it will attempt to match with every
device on the bus through the __driver_attach() function. Currently, if
the bus_type.match() function encounters an error that is not
-EPROBE_DEFER, __driver_attach() will return a negative error code, which
causes the driver registration logic to stop trying to match with the
remaining devices on the bus.

This behavior is not correct; a failure while matching a driver to a
device does not mean that the driver won't be able to match and bind
with other devices on the bus. Update the logic in __driver_attach()
to reflect this.

Fixes: 656b8035b0 ("ARM: 8524/1: driver cohandle -EPROBE_DEFER from bus_type.match()")
Cc: stable@vger.kernel.org
Cc: Saravana Kannan <saravanak@google.com>
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
Link: https://lore.kernel.org/r/20220921001414.4046492-1-isaacmanjarres@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-14 10:16:36 +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 drivers/base: build kunit tests without structleak plugin 2021-03-17 17:06:24 +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 driver core: add deferring probe reason to devices_deferred property 2020-07-30 09:03:43 +02:00
bus.c driver: base: fix UAF when driver_attach failed 2022-06-14 18:32:34 +02:00
cacheinfo.c drivers core: Use sysfs_emit for shared_cpu_map_show and shared_cpu_list_show 2020-10-02 13:24:40 +02:00
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 drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
devres.c devres: provide devm_krealloc() 2020-09-08 13:32:06 +02:00
devtmpfs.c devtmpfs regression fix: reconfigure on each mount 2022-01-20 09:17:49 +01:00
driver.c drivers: base: Convert to printk alias functions 2020-07-10 14:16:44 +02:00
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile device property: Move fwnode_connection_find_match() under drivers/base/property.c 2020-09-08 13:32:06 +02:00
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 drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
property.c device property: Fix fwnode_graph_devcon_match() fwnode leak 2022-01-27 10:54:25 +01:00
soc.c drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
swnode.c software node: fix wrong node passed to find nargs_prop 2022-01-27 10:53:59 +01:00
syscore.c syscore: Use pm_pr_dbg() for syscore_{suspend,resume}() 2020-09-08 13:32:06 +02:00
topology.c drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
transport_class.c