linux_dsm_epyc7002/drivers/media
Jia-Ju Bai bb6d42061a media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run()
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>
2020-01-08 14:37:28 +01:00
..
cec media: cec: check 'transmit_in_progress', not 'transmitting' 2019-12-13 11:22:10 +01:00
common media: saa7146: Avoid using BUG_ON as an assertion 2020-01-08 14:28:59 +01:00
dvb-core media: dvb-core: Fix receiving invalid EIT-sections 2020-01-08 11:46:34 +01:00
dvb-frontends media: au8522: improve formatting 2020-01-08 11:45:50 +01:00
firewire media: firewire: Make structure fdtv_ca constant 2019-08-21 18:39:55 -03:00
i2c media: i2c: mt9v032: fix enum mbus codes and frame sizes 2020-01-04 08:09:59 +01:00
mc media: mc-device.c: fix memleak in media_device_register_entity 2019-10-01 12:26:35 -03:00
mmc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci media: pci: ivtv: convert to i2c_new_scanned_device 2020-01-08 14:33:04 +01:00
platform media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run() 2020-01-08 14:37:28 +01:00
radio media: si470x-i2c: add missed operations in remove 2019-11-10 07:28:15 +01:00
rc media: rc: ir-hix5hd2: add hi3796cv300-ir support 2020-01-08 11:48:20 +01:00
spi media: Clarify how menus are hidden by SUBDRV_AUTOSELECT 2019-08-19 12:00:29 -03:00
tuners media: tuners: Use the correct style for SPDX License Identifier 2019-10-24 18:57:55 -03:00
usb media: pvrusb2: Remove unneeded semicolon and add newline 2020-01-08 14:36:32 +01:00
v4l2-core media: v4l2-core: only zero-out ioctl-read buffers 2020-01-08 13:27:58 +01:00
Kconfig media: Clarify how menus are hidden by SUBDRV_AUTOSELECT 2019-08-19 12:00:29 -03:00
Makefile media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00