Home
last modified time | relevance | path

Searched hist:"6107 a4fdf8554a7aa9488bdc835bb010062fa8a9" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/media/i2c/
H A Dtc358743.cdiff 6107a4fdf8554a7aa9488bdc835bb010062fa8a9 Tue Apr 06 15:39:29 CEST 2021 Yang Yingliang <yangyingliang@huawei.com> media: tc358743: fix possible use-after-free in tc358743_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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>