linux/drivers
Yang Yingliang e1723d8b87 phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove()
This driver's remove path calls cancel_delayed_work(). However, that
function does not wait until the work function finishes. This means
that the callback function may still be running after the driver's
remove function has finished, which would result in a use-after-free.

Fix by calling cancel_delayed_work_sync(), which ensures that
the work is properly cancelled, no longer running, and unable
to re-schedule itself.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210407092716.3270248-1-yangyingliang@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16 07:27:19 +02:00
..
accessibility speakup: i18n: Switch to kmemdup_nul() in spk_msg_set() 2021-04-10 10:58:50 +02:00
acpi Merge branches 'acpi-tables' and 'acpi-scan' 2021-04-02 16:57:56 +02:00
amba
android binder: tell userspace to dump current backtrace when detected oneway spamming 2021-04-10 10:52:04 +02:00
ata
atm
auxdisplay
base Driver core fix for 5.12-rc6 2021-04-03 10:14:47 -07:00
bcma
block block-5.12-2021-04-02 2021-04-02 16:13:13 -07:00
bluetooth
bus MHI changes for v5.13 2021-04-11 08:53:17 +02:00
cdrom
char Merge 5.12-rc6 into char-misc-next 2021-04-05 08:43:50 +02:00
clk
clocksource
connector
counter
cpufreq
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon extcon: qcom-spmi: Add support for VBUS detection 2021-04-08 13:10:16 +09:00
firewire firewire: nosy: Fix a use-after-free bug in nosy_ioctl() 2021-04-04 14:05:45 -07:00
firmware firmware: qcom-scm: Fix QCOM_SCM configuration 2021-04-10 11:01:19 +02:00
fpga fpga: dfl: pci: add DID for D5005 PAC cards 2021-04-05 17:46:56 -07:00
fsi
gnss
gpio
gpu drm/imx: imx-drm-core and imx-ldb fixes 2021-04-02 04:53:16 +10:00
greybus greybus: es2: fix kernel-doc warnings 2021-04-16 07:26:50 +02:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing stm class: Use correct UUID APIs 2021-04-16 07:26:50 +02:00
i2c
i3c
ide
idle
iio
infiniband
input
interconnect interconnect changes for 5.13 2021-04-15 11:06:46 +02:00
iommu
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc habanalabs/gaudi: Fix uninitialized return code rc when read size is zero 2021-04-16 07:26:50 +02:00
mmc
most drivers: most: use LIST_HEAD() for list_head 2021-04-02 16:26:03 +02:00
mtd
mux mux: gpio: Simplify code by using dev_err_probe() 2021-04-02 16:28:53 +02:00
net
nfc
ntb
nubus
nvdimm
nvme
nvmem nvmem: qfprom: Add support for fuse blowing on sc7280 2021-04-02 16:28:10 +02:00
of
opp
parisc
parport
pci
pcmcia
perf
phy phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove() 2021-04-16 07:27:19 +02:00
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI fixes on 20210402 2021-04-03 09:07:35 -07:00
sh
siox
slimbus
soc OpenRISC fix for 5.12 2021-04-03 15:42:45 -07:00
soundwire soundwire: intel_init: test link->cdns 2021-04-06 10:26:44 +05:30
spi
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty Serial driver fix for 5.12-rc6 2021-04-03 10:00:53 -07:00
uio
usb
vdpa
vfio
vhost
video fbdev: zero-fill colormap in fbcmap.c 2021-04-10 11:12:08 +02:00
virt
virtio
visorbus
vlynq
vme
w1 w1: ds28e17: Use module_w1_family to simplify the code 2021-04-10 10:58:21 +02:00
watchdog
xen
zorro
Kconfig
Makefile