summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-04-07 12:27:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-22 11:57:17 +0300
commita8b50d22a9b181a09cd5ca3feee023e06cc26174 (patch)
treee17b452217976686a1393e5b216cbb1386d641f3 /fs/btrfs
parente64b65d96256b6968793fec166d1015fdbf05a7c (diff)
downloadlinux-a8b50d22a9b181a09cd5ca3feee023e06cc26174.tar.xz
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>
Diffstat (limited to 'fs/btrfs')
0 files changed, 0 insertions, 0 deletions