OpenCloudOS-Kernel/drivers/media/usb/dvb-usb-v2
Arnd Bergmann 005145378c [media] dvb-usb-v2: avoid use-after-free
I ran into a stack frame size warning because of the on-stack copy of
the USB device structure:

drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usbv2_disconnect':
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:1029:1: error: the frame size of 1104 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Copying a device structure like this is wrong for a number of other reasons
too aside from the possible stack overflow. One of them is that the
dev_info() call will print the name of the device later, but AFAICT
we have only copied a pointer to the name earlier and the actual name
has been freed by the time it gets printed.

This removes the on-stack copy of the device and instead copies the
device name using kstrdup(). I'm ignoring the possible failure here
as both printk() and kfree() are able to deal with NULL pointers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-08 11:45:09 -02:00
..
Kconfig [media] zd1301: ZyDAS ZD1301 DVB USB interface driver 2017-02-03 06:47:35 -02:00
Makefile [media] zd1301: ZyDAS ZD1301 DVB USB interface driver 2017-02-03 06:47:35 -02:00
af9015.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
af9015.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
af9035.c [media] af9035: correct demod i2c addresses 2017-01-31 10:51:09 -02:00
af9035.h [media] af9035: register it9133 tuner using platform binding 2017-01-31 10:49:42 -02:00
anysee.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
anysee.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
au6610.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
au6610.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
az6007.c [media] rc: split nec protocol into its three variants 2016-09-22 11:46:49 -03:00
ce6230.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ce6230.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb_usb.h [media] media: change email address 2016-01-25 12:01:08 -02:00
dvb_usb_common.h [media] media: change email address 2016-01-25 12:01:08 -02:00
dvb_usb_core.c [media] dvb-usb-v2: avoid use-after-free 2017-02-08 11:45:09 -02:00
dvb_usb_urb.c [media] media: change email address 2016-01-25 12:01:08 -02:00
dvbsky.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ec168.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ec168.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
gl861.c [media] gl861: use Kernel dev_foo() logging 2012-09-23 20:50:13 -03:00
gl861.h
lmedm04.c [media] lmedm04: make lme2510_powerup a little smaller 2017-02-03 07:39:38 -02:00
lmedm04.h
mxl111sf-demod.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-demod.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-gpio.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-gpio.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-i2c.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-i2c.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-phy.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-phy.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-reg.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-tuner.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf-tuner.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mxl111sf.c [media] dvb-usb-v2: don't break long lines 2016-10-21 09:40:29 -02:00
mxl111sf.h [media] mxl111sf: Add a tuner entity 2016-01-11 12:19:26 -02:00
rtl28xxu.c [media] rc: raw IR drivers cannot handle cec, unknown or other 2017-01-30 12:40:50 -02:00
rtl28xxu.h [media] rtl28xxu: fix control message flaws 2015-10-22 15:48:27 -02:00
usb_urb.c [media] media: change email address 2016-01-25 12:01:08 -02:00
zd1301.c [media] zd1301: ZyDAS ZD1301 DVB USB interface driver 2017-02-03 06:47:35 -02:00