kernel_optimize_test/drivers
Yang Yingliang 67a97525dd media: i2c: adv7842: fix possible use-after-free in adv7842_remove()
[ Upstream commit 4a15275b6a18597079f18241c87511406575179a ]

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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-11 14:47:29 +02:00
..
accessibility
acpi ACPI: custom_method: fix a possible memory leak 2021-05-11 14:47:12 +02:00
amba
android
ata ata: ahci: Disable SXS for Hisilicon Kunpeng920 2021-05-11 14:47:26 +02:00
atm
auxdisplay
base driver core: Fix locking bug in deferred_probe_timeout_work_func() 2021-04-14 08:42:03 +02:00
bcma
block null_blk: fix command timeout completion handling 2021-04-16 11:43:21 +02:00
bluetooth
bus bus: mhi: core: Clear context for stopped channels from remove() 2021-05-11 14:47:19 +02:00
cdrom
char random: initialize ChaCha20 constants with correct endianness 2021-05-11 14:47:19 +02:00
clk clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return 2021-05-11 14:47:28 +02:00
clocksource
connector
counter
cpufreq
cpuidle cpuidle: tegra: Fix C7 idling state on Tegra114 2021-05-11 14:47:16 +02:00
crypto crypto: omap-aes - Fix PM reference leak on omap-aes.c 2021-05-11 14:47:21 +02:00
dax
dca
devfreq
dio
dma dmaengine: tegra20: Fix runtime PM imbalance on error 2021-04-28 13:40:01 +02:00
dma-buf
edac
eisa
extcon extcon: arizona: Fix various races on driver unbind 2021-05-11 14:47:24 +02:00
firewire
firmware efi/libstub: Add $(CLANG_FLAGS) to x86 flags 2021-05-11 14:47:18 +02:00
fpga fpga: dfl: pci: add DID for D5005 PAC cards 2021-05-11 14:47:19 +02:00
fsi
gnss
gpio gpio: omap: Save and restore sysconfig 2021-04-28 13:39:59 +02:00
gpu drm/msm/dp: Fix incorrect NULL check kbot warnings in DP driver 2021-05-11 14:47:28 +02:00
greybus
hid HID: wacom: Assign boolean values to a bool variable 2021-04-28 13:40:01 +02:00
hsi
hv
hwmon
hwspinlock
hwtracing intel_th: Consistency and off-by-one fix 2021-05-11 14:47:21 +02:00
i2c i2c: designware: Adjust bus_freq_hz when refuse high speed mode set 2021-04-14 08:42:11 +02:00
i3c
ide
idle
iio
infiniband RDMA/addr: Be strict with gid size 2021-04-14 08:42:12 +02:00
input Input: i8042 - fix Pegatron C15B ID entry 2021-04-21 13:00:54 +02:00
interconnect interconnect: core: fix error return code of icc_link_destroy() 2021-04-16 11:43:19 +02:00
iommu
ipack
irqchip irqchip/gic-v3: Do not enable irqs when handling spurious interrups 2021-05-11 14:47:15 +02:00
isdn
leds
lightnvm
macintosh
mailbox
mcb
md dm verity fec: fix misaligned RS roots IO 2021-04-21 13:00:54 +02:00
media media: i2c: adv7842: fix possible use-after-free in adv7842_remove() 2021-05-11 14:47:29 +02:00
memory
memstick
message
mfd
misc mei: me: add Alder Lake P device id. 2021-05-02 11:06:09 +02:00
mmc mmc: sdhci-brcmstb: Remove CQE quirk 2021-05-11 14:47:26 +02:00
most
mtd mtd: physmap: physmap-bt1-rom: Fix unintentional stack access 2021-05-11 14:47:13 +02:00
mux
net staging: wimax/i2400m: fix byte-order issue 2021-05-11 14:47:16 +02:00
nfc
ntb
nubus
nvdimm libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC 2021-04-21 13:00:55 +02:00
nvme nvmet: return proper error code from discovery ctrl 2021-05-11 14:47:26 +02:00
nvmem
of
opp
oprofile
parisc
parport
pci PCI: PM: Do not read power state in pci_enable_device_flags() 2021-05-11 14:47:18 +02:00
pcmcia
perf perf/arm_pmu_platform: Fix error handling 2021-05-11 14:47:19 +02:00
phy phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove() 2021-05-11 14:47:21 +02:00
pinctrl pinctrl: core: Show pin numbers for the controllers with base = 0 2021-04-28 13:39:59 +02:00
platform platform/x86: intel_pmc_core: Don't use global pmcdev in quirks 2021-05-11 14:47:21 +02:00
pnp
power power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove() 2021-05-11 14:47:28 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras RAS/CEC: Correct ce_add_elem()'s returned values 2021-04-14 08:42:12 +02:00
regulator regulator: bd9571mwv: Fix AVS and DVFS voltage range 2021-04-14 08:42:05 +02:00
remoteproc remoteproc: qcom: pil_info: avoid 64-bit division 2021-04-14 08:42:05 +02:00
reset
rpmsg
rtc
s390 s390/zcrypt: fix zcard and zqueue hot-unplug memleak 2021-05-11 14:47:11 +02:00
sbus
scsi scsi: scsi_dh_alua: Remove check for ASC 24h in alua_rtpg() 2021-05-11 14:47:28 +02:00
sfi
sh
siox
slimbus
soc soc/tegra: pmc: Fix completion of power-gate toggling 2021-05-11 14:47:18 +02:00
soundwire soundwire: cadence: only prepare attached devices on clock stop 2021-05-11 14:47:19 +02:00
spi spi: sync up initial chipselect state 2021-05-11 14:47:22 +02:00
spmi
ssb
staging atomisp: don't let it go past pipes array 2021-05-11 14:47:24 +02:00
target scsi: target: pscsi: Fix warning in pscsi_complete_cmd() 2021-05-11 14:47:23 +02:00
tc
tee tee: optee: do not check memref size on return from Secure World 2021-05-11 14:47:18 +02:00
thermal
thunderbolt thunderbolt: Fix off by one in tb_port_find_retimer() 2021-04-14 08:42:03 +02:00
tty tty: n_gsm: check error while registering tty devices 2021-05-11 14:47:21 +02:00
uio
usb usb: dwc3: gadget: Check for disabled LPM quirk 2021-05-11 14:47:20 +02:00
vdpa vdpa/mlx5: Set err = -ENOMEM in case dma_map_sg_attrs fails 2021-04-28 13:39:59 +02:00
vfio vfio: Depend on MMU 2021-05-07 11:04:33 +02:00
vhost vhost-vdpa: fix vm_flags for virtqueue doorbell mapping 2021-05-11 14:47:12 +02:00
video backlight: qcom-wled: Fix FSC update issue for WLED5 2021-05-11 14:47:25 +02:00
virt nitro_enclaves: Fix stale file descriptors on failed usercopy 2021-05-11 14:47:11 +02:00
virtio
visorbus
vlynq
vme
w1
watchdog
xen xen/events: fix setting irq affinity 2021-04-16 11:43:22 +02:00
zorro
Kconfig
Makefile