android_kernel_samsung_a7y1.../drivers/media/platform
Jia-Ju Bai 8081f12140 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>
2020-04-07 13:55:42 +02:00
..
am437x media: am437x-vpfe: Setting STD to current value is not an error 2020-04-07 13:20:13 +02:00
blackfin A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
coda media: coda: Remove unbalanced and unneeded mutex unlock 2020-04-06 20:04:21 +02:00
davinci media: davinci/vpbe: array underflow in vpbe_enum_outputs() 2020-04-07 13:41:48 +02:00
exynos A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exynos-gsc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exynos4-is media: exynos4-is: Fix recursive locking in isp_video_release() 2020-04-07 13:37:12 +02:00
marvell-ccic media: marvell-ccic: fix DMA s/g desc number calculation 2020-04-06 19:54:17 +02:00
omap media: omap_vout: potential buffer overflow in vidioc_dqbuf() 2020-04-07 13:41:46 +02:00
omap3isp media: omap3isp: Set device on omap3isp subdevs 2020-04-07 07:39:29 +02:00
s3c-camif A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s5p-g2d media: s5p-g2d: Correct return type for mem2mem buffer helpers 2020-04-06 14:51:09 +02:00
s5p-jpeg media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL 2020-04-07 13:40:07 +02:00
s5p-mfc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
s5p-tv A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc_camera A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sti media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run() 2020-04-07 13:55:42 +02:00
ti-vpe media: ti-vpe: vpe: Make sure YUYV is set as default format 2020-04-07 13:20:37 +02:00
vivid media: vivid: fix incorrect assignment operation when setting video mode 2020-04-07 13:42:11 +02:00
vsp1 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xilinx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
arv.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fsl-viu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
m2m-deinterlace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mx2_emmaprp.c media: mx2_emmaprp: Correct return type for mem2mem buffer helpers 2020-04-06 14:51:12 +02:00
rcar_jpu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sh_veu.c media: sh_veu: Correct return type for mem2mem buffer helpers 2020-04-06 14:51:02 +02:00
sh_vou.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
timblogiw.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
via-camera.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
via-camera.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vim2m.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30