WSL2-Linux-Kernel/drivers
Lukas Wunner 654888327e driver core: Avoid binding drivers to dead devices
Commit 3451a495ef ("driver core: Establish order of operations for
device_add and device_del via bitflag") sought to prevent asynchronous
driver binding to a device which is being removed.  It added a
per-device "dead" flag which is checked in the following code paths:

* asynchronous binding in __driver_attach_async_helper()
*  synchronous binding in device_driver_attach()
* asynchronous binding in __device_attach_async_helper()

It did *not* check the flag upon:

*  synchronous binding in __device_attach()

However __device_attach() may also be called asynchronously from:

deferred_probe_work_func()
  bus_probe_device()
    device_initial_probe()
      __device_attach()

So if the commit's intention was to check the "dead" flag in all
asynchronous code paths, then a check is also necessary in
__device_attach().  Add the missing check.

Fixes: 3451a495ef ("driver core: Establish order of operations for device_add and device_del via bitflag")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: stable@vger.kernel.org # v5.1+
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Link: https://lore.kernel.org/r/de88a23a6fe0ef70f7cfd13c8aea9ab51b4edab6.1594214103.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-30 08:48:34 +02:00
..
accessibility
acpi Merge branch 'acpi-fan' 2020-07-03 16:15:31 +02:00
amba
android binder: Don't use mmput() from shrinker function. 2020-07-23 09:47:12 +02:00
ata
atm
auxdisplay
base driver core: Avoid binding drivers to dead devices 2020-07-30 08:48:34 +02:00
bcma
block Char/Misc fixes for 5.8-rc6 2020-07-16 11:26:40 -07:00
bluetooth
bus Fix a suspend/resume regression (crash) on TI AM3/AM4 SoC's. 2020-07-25 13:27:12 -07:00
cdrom
char /dev/mem: Add missing memory barriers for devmem_inode 2020-07-23 09:47:13 +02:00
clk A couple build fixes for issues exposed this merge window and a fix for 2020-07-15 19:00:12 -07:00
clocksource Fix a suspend/resume regression (crash) on TI AM3/AM4 SoC's. 2020-07-25 13:27:12 -07:00
connector
counter
cpufreq cpufreq: intel_pstate: Fix active mode setting from command line 2020-07-13 17:55:57 +02:00
cpuidle
crypto crypto/chtls: correct net_device reference count 2020-07-20 18:28:04 -07:00
dax
dca
devfreq
dio
dma dmaengine fixes for v5.5-rc6 2020-07-15 15:58:11 -07:00
dma-buf dmabuf: use spinlock to access dmabuf->name 2020-07-10 15:39:29 +05:30
edac
eisa
extcon
firewire
firmware Revert "test_firmware: Test platform fw loading on non-EFI systems" 2020-07-27 12:14:28 +02:00
fpga fpga: dfl: fix bug in port reset handshake 2020-07-13 22:11:17 -07:00
fsi
gnss
gpio
gpu Merge tag 'amd-drm-fixes-5.8-2020-07-22' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 2020-07-23 14:06:16 +10:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid into master 2020-07-17 09:43:13 -07:00
hsi
hv Drivers: hv: Change flag to write log level in panic msg to false 2020-06-29 10:30:35 +00:00
hwmon hwmon: (drivetemp) Avoid SCT usage on Toshiba DT01ACA family drives 2020-07-18 08:11:44 -07:00
hwspinlock
hwtracing intel_th: Fix a NULL dereference when hub driver is not loaded 2020-07-10 15:12:48 +02:00
i2c i2c: i2c-qcom-geni: Fix DMA transfer race 2020-07-23 22:26:44 +02:00
i3c
ide
idle
iio First set of IIO and counter fixes in the 5.8 cycle. 2020-07-08 09:20:50 +02:00
infiniband RDMA/mlx5: Prevent prefetch from racing with implicit destruction 2020-07-21 13:51:35 -03:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-07-13 18:31:15 -07:00
interconnect interconnect: msm8916: Fix buswidth of pcnoc_s nodes 2020-07-23 10:45:24 +02:00
iommu iommu/qcom: Use domain rather than dev as tlb cookie 2020-07-22 17:29:28 +02:00
ipack
irqchip Bugfixes and a one-liner patch to silence sparse. 2020-07-06 12:48:04 -07:00
isdn
leds
lightnvm
macintosh
mailbox
mcb
md dm integrity: fix integrity recalculation that is improperly skipped 2020-07-23 14:39:37 -04:00
media
memory
memstick
message
mfd irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-14 17:44:42 +02:00
misc habanalabs: prevent possible out-of-bounds array access 2020-07-19 08:15:36 +03:00
mmc mmc: sdhci-of-aspeed: Fix clock divider calculation 2020-07-13 12:17:34 +02:00
most
mtd mtd: rawnand: xway: Fix build issue 2020-07-07 21:04:38 +02:00
mux
net drivers/net/wan: lapb: Corrected the usage of skb_cow 2020-07-24 20:17:42 -07:00
nfc nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame 2020-07-20 18:31:33 -07:00
ntb
nubus
nvdimm libnvdimm/security: Fix key lookup permissions 2020-07-08 17:08:01 -07:00
nvme nvme: explicitly update mpath disk capacity on revalidation 2020-07-16 16:40:27 +02:00
nvmem
of
opp opp: Increase parsed_static_opps in _of_add_opp_table_v1() 2020-07-16 08:50:54 +05:30
oprofile
parisc
parport
pci pci-v5.8-fixes-2 2020-07-24 18:30:24 -07:00
pcmcia
perf drivers/perf: Prevent forced unbinding of PMU drivers 2020-07-17 10:51:44 +01:00
phy phy: fixes for 5.8 2020-07-08 18:00:07 +02:00
pinctrl intel-pinctrl for v5.8-2 2020-06-28 01:08:21 +02:00
platform platform/x86: asus-wmi: allow BAT1 battery name 2020-07-15 12:47:04 +03:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 vfio-ccw: Fix a build error due to missing include of linux/slab.h 2020-07-03 11:41:31 +02:00
sbus
scsi scsi: core: Run queue in case of I/O resource contention failure 2020-07-20 21:38:20 -04:00
sfi
sh
siox
slimbus
soc i.MX fixes for 5.8, round 2: 2020-07-16 22:08:07 +02:00
soundwire
spi spi: Fixes for v5.8 2020-07-17 10:24:09 -07:00
spmi
ssb
staging Staging driver fixes for 5.8-rc7 2020-07-26 09:14:59 -07:00
target
tc
tee
thermal - Fix invalid index array access on int340x_thermal leading to a 2020-07-16 11:08:54 -07:00
thunderbolt
tty serial: exar: Fix GPIO configuration for Sealevel cards based on XR17V35X 2020-07-24 10:58:14 +02:00
uio uio_pdrv_genirq: fix use without device tree and no interrupt 2020-07-03 10:52:02 +02:00
usb usb: tegra: Fix allocation for the FPCI context 2020-07-23 13:21:01 +02:00
vdpa
vfio vfio/pci: fix racy on error and request eventfd ctx 2020-07-17 08:28:40 -06:00
vhost
video fbdev: Detect integer underflow at "struct fbcon_ops"->clear_margins. 2020-07-23 16:22:25 +02:00
virt virt: vbox: Fix guest capabilities mask check 2020-07-10 13:40:19 +02:00
virtio pci-v5.8-fixes-2 2020-07-24 18:30:24 -07:00
visorbus
vlynq
vme
w1
watchdog
xen xen: branch for v5.8-rc5 2020-07-11 11:16:46 -07:00
zorro
Kconfig
Makefile