WSL2-Linux-Kernel/drivers/media/usb/uvc
Mauro Carvalho Chehab 1a10d7fdb6 media: uvc: don't do DMA on stack
As warned by smatch:
	drivers/media/usb/uvc/uvc_v4l2.c:911 uvc_ioctl_g_input() error: doing dma on the stack (&i)
	drivers/media/usb/uvc/uvc_v4l2.c:943 uvc_ioctl_s_input() error: doing dma on the stack (&i)

those two functions call uvc_query_ctrl passing a pointer to
a data at the DMA stack. those are used to send URBs via
usb_control_msg(). Using DMA stack is not supported and should
not work anymore on modern Linux versions.

So, use a kmalloc'ed buffer.

Cc: stable@vger.kernel.org	# Kernel 4.9 and upper
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-07-12 09:16:31 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile media: uvcvideo: Add a metadata device node 2018-01-04 06:41:47 -05:00
uvc_ctrl.c media: uvcvideo: Rename debug functions 2021-01-27 15:08:19 +01:00
uvc_debugfs.c media: usb: uvc: no need to check return value of debugfs_create functions 2020-09-26 10:15:17 +02:00
uvc_driver.c media: uvcvideo: Support devices that report an OT as an entity source 2021-04-06 14:26:31 +02:00
uvc_entity.c media: uvcvideo: Use dev_ printk aliases 2021-01-27 15:06:10 +01:00
uvc_isight.c media: uvcvideo: Rename debug functions 2021-01-27 15:08:19 +01:00
uvc_metadata.c media: uvcvideo: Fix a typo in UVC_METATADA_BUF_SIZE 2019-10-16 16:34:34 -03:00
uvc_queue.c media: uvcvideo: Rename debug functions 2021-01-27 15:08:19 +01:00
uvc_status.c media: uvcvideo: Rename debug functions 2021-01-27 15:08:19 +01:00
uvc_v4l2.c media: uvc: don't do DMA on stack 2021-07-12 09:16:31 +02:00
uvc_video.c media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K 2021-06-11 11:23:56 +02:00
uvcvideo.h media: uvcvideo: Use dma_alloc_noncontiguous API 2021-03-19 14:13:13 +01:00