linux-brain/drivers/media/usb
Mauro Carvalho Chehab 9d91046f6b media: uvc: don't do DMA on stack
commit 1a10d7fdb6d0e235e9d230916244cc2769d3f170 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-22 12:26:21 +02:00
..
airspy media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
as102 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
au0828 media: au0828: fix a NULL vs IS_ERR() check 2021-07-14 16:53:21 +02:00
b2c2 media: flexcop-usb: fix endpoint sanity check 2020-04-01 11:02:15 +02:00
cpia2 media: cpia2: fix memory leak in cpia2_usb_probe 2021-07-14 16:53:11 +02:00
cx231xx media: usb: cx231xx-417: fix a memory leak bug 2019-08-26 10:40:17 -03:00
dvb-usb media: dvb-usb: Fix error handling in dvb_usb_i2c_init 2021-09-15 09:47:31 +02:00
dvb-usb-v2 media: rtl28xxu: fix zero-length control request 2021-08-12 13:21:01 +02:00
em28xx media: em28xx-input: fix refcount bug in em28xx_usb_disconnect 2021-09-15 09:47:33 +02:00
go7007 media: go7007: remove redundant initialization 2021-09-15 09:47:31 +02:00
gspca media: gspca/sunplus: fix zero-length control requests 2021-07-19 08:53:18 +02:00
hackrf Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
hdpvr media: hdpvr: remove redundant assignment to retval 2019-08-26 10:43:53 -03:00
msi2500 media: msi2500: assign SPI bus number dynamically 2020-12-30 11:51:00 +01:00
pulse8-cec media: pulse8-cec: fix lost cec_transmit_attempt_done() call 2020-01-09 10:19:56 +01:00
pvrusb2 media: pvrusb2: fix warning in pvr2_i2c_core_done 2021-07-14 16:53:11 +02:00
pwc media: pwc: Use correct device for DMA 2021-02-23 15:02:26 +01:00
rainshadow-cec treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 55 2019-05-24 17:36:42 +02:00
s2255 media: drivers/media: don't set pix->priv = 0 2019-07-23 08:48:33 -04:00
siano USB fixes for 5.2-rc3 2019-05-31 08:16:31 -07:00
stk1160 media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
stkwebcam media: stkwebcam: fix memory leak in stk_camera_probe 2021-09-12 08:56:40 +02:00
tm6000 media: tm6000: Fix memleak in tm6000_start_stream 2021-03-04 10:26:21 +01:00
ttusb-budget treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ttusb-dec media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() 2019-08-21 18:39:55 -03:00
usbtv media: usbtv: Fix deadlock on suspend 2021-03-17 17:03:39 +01:00
usbvision media: usbvision: Fix races among open, close, and disconnect 2019-11-29 10:10:06 +01:00
uvc media: uvc: don't do DMA on stack 2021-09-22 12:26:21 +02:00
zr364xx media: drivers/media/usb: fix memory leak in zr364xx_probe 2021-08-26 08:36:12 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00