linux_dsm_epyc7002/drivers/media/platform/sti/bdisp
Jia-Ju Bai df8ab4c601 media: bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_save_request
The driver may sleep under a spinlock.
The function call path is:
bdisp_device_run (acquire the spinlock)
  bdisp_hw_update
    bdisp_hw_save_request
      devm_kzalloc(GFP_KERNEL) --> may sleep

To fix it, GFP_KERNEL is replaced with GFP_ATOMIC.

This bug is found by my static analysis tool(DSAC) and checked by my code review.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-12-18 15:02:48 -05:00
..
bdisp-debug.c media: platform: sti: Adopt SPDX identifier 2017-12-13 09:54:41 -05:00
bdisp-filter.h media: platform: sti: Adopt SPDX identifier 2017-12-13 09:54:41 -05:00
bdisp-hw.c media: bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_save_request 2017-12-18 15:02:48 -05:00
bdisp-reg.h media: platform: sti: Adopt SPDX identifier 2017-12-13 09:54:41 -05:00
bdisp-v4l2.c media: platform: sti: Adopt SPDX identifier 2017-12-13 09:54:41 -05:00
bdisp.h media: platform: sti: Adopt SPDX identifier 2017-12-13 09:54:41 -05:00
Makefile