linux/drivers/phy/ti
Yang Yingliang a16162a174 phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove()
[ Upstream commit e1723d8b87 ]

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-11 14:47:21 +02:00
..
Kconfig phy: ti: gmii-sel: simplify config dependencies between net drivers and gmii phy 2020-03-26 20:01:13 -07:00
Makefile phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC 2020-01-14 10:50:19 +05:30
phy-am654-serdes.c Merge 5.9-rc8 into usb-next 2020-10-05 08:54:36 +02:00
phy-da8xx-usb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
phy-dm816x-usb.c phy: ti: dm816x: remove set but unused variable 2020-07-08 16:40:24 +05:30
phy-gmii-sel.c phy: ti: gmii-sel: retrieve ports number and base offset from dt 2020-09-08 15:53:10 +05:30
phy-j721e-wiz.c phy: ti: j721e-wiz: Remove duplicate include 2020-08-23 21:37:28 +05:30
phy-omap-control.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
phy-omap-usb2.c phy: omap-usb2-phy: fix coding style issues 2020-08-31 14:31:31 +05:30
phy-ti-pipe3.c phy: ti-pipe3: remove set but unused variable 2020-07-08 16:40:28 +05:30
phy-tusb1210.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
phy-twl4030-usb.c phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove() 2021-05-11 14:47:21 +02:00