linux/drivers/media/pci/ivtv
Jia-Ju Bai 8d11eb847d media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init()
The driver may sleep in a interrupt handler.

The function call paths (from bottom to top) in Linux-4.16 are:

[FUNC] kzalloc(GFP_KERNEL)
drivers/media/pci/ivtv/ivtv-yuv.c, 938:
	kzalloc in ivtv_yuv_init
drivers/media/pci/ivtv/ivtv-yuv.c, 960:
	ivtv_yuv_init in ivtv_yuv_next_free
drivers/media/pci/ivtv/ivtv-yuv.c, 1126:
	ivtv_yuv_next_free in ivtv_yuv_setup_stream_frame
drivers/media/pci/ivtv/ivtv-irq.c, 827:
	ivtv_yuv_setup_stream_frame in ivtv_irq_dec_data_req
drivers/media/pci/ivtv/ivtv-irq.c, 1013:
	ivtv_irq_dec_data_req in ivtv_irq_handler

To fix this bug, GFP_KERNEL is replaced with GFP_ATOMIC.

This bug is found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-09-24 09:09:07 -04:00
..
ivtv-alsa-main.c media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
ivtv-alsa-pcm.c media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
ivtv-alsa-pcm.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ivtv-alsa.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ivtv-cards.c media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
ivtv-cards.h media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
ivtv-controls.c
ivtv-controls.h
ivtv-driver.c media: pci: ivtv: Replace GFP_ATOMIC with GFP_KERNEL 2018-07-27 08:15:55 -04:00
ivtv-driver.h media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
ivtv-fileops.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
ivtv-fileops.h media: annotate ->poll() instances 2017-11-27 16:20:06 -05:00
ivtv-firmware.c media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
ivtv-firmware.h
ivtv-gpio.c
ivtv-gpio.h
ivtv-i2c.c media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
ivtv-i2c.h
ivtv-ioctl.c media: dvb: move compat handlers into drivers 2018-09-12 11:00:51 -04:00
ivtv-ioctl.h
ivtv-irq.c media: pci: Convert timers to use timer_setup() 2017-10-31 07:24:43 -04:00
ivtv-irq.h media: pci: Convert timers to use timer_setup() 2017-10-31 07:24:43 -04:00
ivtv-mailbox.c media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
ivtv-mailbox.h
ivtv-queue.c
ivtv-queue.h
ivtv-routing.c
ivtv-routing.h
ivtv-streams.c media: dvb: move most compat_ioctl handling into drivers 2018-09-12 11:00:51 -04:00
ivtv-streams.h
ivtv-udma.c [media] ivtv: use for_each_sg 2017-04-05 15:17:15 -03:00
ivtv-udma.h
ivtv-vbi.c
ivtv-vbi.h
ivtv-version.h
ivtv-yuv.c media: pci: ivtv: Fix a sleep-in-atomic-context bug in ivtv_yuv_init() 2018-09-24 09:09:07 -04:00
ivtv-yuv.h
ivtvfb.c media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
Kconfig [media] ivtv: mark DVB "borrowed" ioctls as deprecated 2017-02-03 07:08:24 -02:00
Makefile media: don't include drivers/media/i2c at cflags 2017-12-28 14:14:09 -05:00