summaryrefslogtreecommitdiff
path: root/drivers/hwmon/ltc4261.c
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2019-12-19 11:34:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-24 08:36:26 +0100
commitfc3c0fc85d69ece2eee38f617384e22ce3191250 (patch)
tree80676a3ed2edb5e989ea8720864d3b7856b76351 /drivers/hwmon/ltc4261.c
parentbc4730880281a20fbd8cf227a6e3ce8ae1a98e57 (diff)
media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run()
[ Upstream commit bb6d42061a05d71dd73f620582d9e09c8fbf7f5b ] The driver may sleep while holding a spinlock. The function call path (from bottom to top) in Linux 4.19 is: drivers/media/platform/sti/bdisp/bdisp-hw.c, 385: msleep in bdisp_hw_reset drivers/media/platform/sti/bdisp/bdisp-v4l2.c, 341: bdisp_hw_reset in bdisp_device_run drivers/media/platform/sti/bdisp/bdisp-v4l2.c, 317: _raw_spin_lock_irqsave in bdisp_device_run To fix this bug, msleep() is replaced with udelay(). This bug is found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Reviewed-by: Fabien Dessenne <fabien.dessenne@st.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>
Diffstat (limited to 'drivers/hwmon/ltc4261.c')
0 files changed, 0 insertions, 0 deletions