linux-stable/drivers/base
Tetsuo Handa 6affee7ddf driver core: Fix probe_count imbalance in really_probe()
commit b292b50b0e 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: 7c35e699c8 ("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 09:51:11 +02:00
..
power PM: sleep: core: Fix the handling of pending runtime resume requests 2020-09-03 11:22:32 +02:00
regmap regmap: debugfs: check count when read regmap file 2020-07-31 16:44:45 +02:00
test License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arch_topology.c arch_topology: Fix section miss match warning due to free_raw_capacity() 2020-04-24 08:01:03 +02:00
attribute_container.c
base.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bus.c kobject: return error code if writing /sys/.../uevent fails 2019-02-12 19:46:02 +01:00
cacheinfo.c drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT 2019-07-21 09:04:16 +02:00
class.c driver core: remove class_attrs from struct class 2017-06-09 10:41:00 +02:00
component.c component: Silence bind error on -EPROBE_DEFER 2020-05-27 16:42:57 +02:00
container.c
core.c device property: Fix the secondary firmware node handling in set_primary_fwnode() 2020-09-03 11:22:32 +02:00
cpu.c x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mitigation 2020-06-11 09:23:01 +02:00
dd.c driver core: Fix probe_count imbalance in really_probe() 2020-10-14 09:51:11 +02:00
devcoredump.c driver core: devcoredump: convert to use class_groups 2016-11-29 21:12:12 +01:00
devres.c devres: Align data[] to ARCH_KMALLOC_MINALIGN 2019-05-16 19:42:29 +02:00
devtmpfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-coherent.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-contiguous.c cma: Store a name in the cma structure 2017-04-18 20:41:12 +02:00
dma-mapping.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
driver.c
firmware.c
firmware_class.c Revert "firmware: add sanity check on shutdown/suspend" 2017-09-10 21:19:06 -07:00
hypervisor.c
init.c
isa.c isa: Prevent NULL dereference in isa_bus driver callbacks 2017-12-14 09:52:51 +01:00
Kconfig dma-buf/fence: Fix lock inversion within dma-fence-array 2018-03-19 08:42:47 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
map.c
memory.c mm/memory_hotplug: Do not unlock when fails to take the device_hotplug_lock 2019-12-01 09:14:14 +01:00
module.c
node.c mm: hide incomplete nr_indirectly_reclaimable in sysfs 2019-04-20 09:15:10 +02:00
pinctrl.c driver core: fix automatic pinctrl management 2017-06-13 11:07:32 +02:00
platform-msi.c platform-msi: Free descriptors in platform_msi_domain_free() 2019-01-09 17:14:48 +01:00
platform.c drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish 2020-06-25 15:41:51 +02:00
property.c ACPI: properties: Align return codes of __acpi_node_get_property_reference() 2017-10-11 21:15:44 +02:00
soc.c base: soc: Export soc_device_register/unregister APIs 2019-10-05 12:47:47 +02:00
syscore.c
topology.c base: topology: constify attribute_group structures. 2017-08-28 17:49:22 +02:00
transport_class.c