TencentOS-kernel/drivers/phy
Yang Yingliang e393fdec46 phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove()
[ Upstream commit e1723d8b87b73ab363256e7ca3af3ddb75855680 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-20 16:07:25 +08:00
..
allwinner phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked 2021-03-16 16:31:57 +08:00
amlogic Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
broadcom drivers: phy: sr-usb: do not use internal fsm for USB2 phy init 2021-03-16 16:30:18 +08:00
cadence Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
freescale Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hisilicon Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
lantiq Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
marvell phy: marvell: comphy: Convert internal SMCC firmware return codes to errno 2021-03-16 16:39:36 +08:00
mediatek Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
motorola phy: cpcap-usb: Fix warning for missing regulator_disable 2021-04-12 12:51:50 +08:00
mscc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
qualcomm phy: qcom-qmp: Use correct values for ipq8074 PCIe Gen2 PHY init 2021-03-16 16:36:08 +08:00
ralink Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
renesas phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure 2021-03-16 16:43:03 +08:00
rockchip phy: rockchip-emmc: emmc_phy_init() always return 0 2021-04-12 12:52:29 +08:00
samsung phy: samsung: s5pv210-usb2: Add delay after reset 2021-03-16 16:37:16 +08:00
socionext phy: uniphier-usb3ss: Add Pro5 support 2021-03-16 16:26:34 +08:00
st Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tegra phy: tegra: xusb: Fix dangling pointer on probe failure 2021-03-16 16:41:41 +08:00
ti phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove() 2021-05-20 16:07:25 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
phy-core-mipi-dphy.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
phy-core.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
phy-lpc18xx-usb-otg.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
phy-pistachio-usb.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
phy-xgene.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00