linux/drivers/base
Tetsuo Handa 7c1847aa49 driver core: Fix probe_count imbalance in really_probe()
commit b292b50b0efcc7095d8bf15505fba6909bb35dce upstream.

syzbot is reporting hung task in wait_for_device_probe() [1]. At least,
we always need to decrement probe_count if we incremented probe_count in
really_probe().

However, since I can't find "Resources present before probing" message in
the console log, both "this message simply flowed off" and "syzbot is not
hitting this path" will be possible. Therefore, while we are at it, let's
also prepare for concurrent wait_for_device_probe() calls by replacing
wake_up() with wake_up_all().

[1] https://syzkaller.appspot.com/bug?id=25c833f1983c9c1d512f4ff860dd0d7f5a2e2c0f

Reported-by: syzbot <syzbot+805f5f6ae37411f15b64@syzkaller.appspotmail.com>
Fixes: 7c35e699c88bd607 ("driver core: Print device when resources present in really_probe()")
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/20200713021254.3444-1-penguin-kernel@I-love.SAKURA.ne.jp
[iwamatsu: Drop patch for deferred_probe_timeout_work_func()]
Signed-off-by: Nobuhiro Iwamatsu (CIP) <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-14 10:32:59 +02:00
..
firmware_loader firmware_loader: fix memory leak for paged buffer 2020-09-23 12:40:34 +02:00
power PM: sleep: core: Fix the handling of pending runtime resume requests 2020-09-03 11:27:05 +02:00
regmap regmap: fix page selection for noinc writes 2020-10-01 13:18:20 +02:00
test driver core: Fix test_async_driver_probe if NUMA is disabled 2020-02-01 09:34:36 +00:00
Kconfig base: arch_topology: update Kconfig help description 2019-07-22 09:36:44 -07:00
Makefile
arch_topology.c cpu-topology: Fix the potential data corruption 2020-10-01 13:17:40 +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 drivers: Introduce device lookup variants by name 2019-07-30 13:07:41 +02:00
cacheinfo.c Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
class.c
component.c component: Silence bind error on -EPROBE_DEFER 2020-05-27 17:46:31 +02:00
container.c
core.c device property: Fix the secondary firmware node handling in set_primary_fwnode() 2020-09-03 11:27:05 +02:00
cpu.c x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mitigation 2020-06-10 20:24:57 +02:00
dd.c driver core: Fix probe_count imbalance in really_probe() 2020-10-14 10:32:59 +02: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 vfs: Convert ramfs, shmem, tmpfs, devtmpfs, rootfs to use the new mount API 2019-09-12 21:05:34 -04:00
driver.c driver_find_device: Unify the match function with class_find_device() 2019-06-24 05:22:31 +02:00
firmware.c
hypervisor.c
init.c
isa.c
map.c
memory.c drivers/base/memory.c: indicate all memory blocks as removable 2020-04-01 11:02:02 +02:00
module.c
node.c mm: don't rely on system state to detect hot-plug operations 2020-10-07 08:01:30 +02:00
pinctrl.c
platform-msi.c
platform.c drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish 2020-06-24 17:50:24 +02:00
property.c device property: Introduce fwnode_find_reference() 2019-06-03 10:55:38 +02:00
soc.c base: soc: Export soc_device_register/unregister APIs 2019-08-05 14:56:31 -07:00
swnode.c Revert "software node: Simplify software_node_release() function" 2020-05-10 10:31:30 +02:00
syscore.c
topology.c topology: Create core_cpus and die_cpus sysfs attributes 2019-05-23 10:08:34 +02:00
transport_class.c