kernel_optimize_test/drivers/media
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
..
cec [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
common [media] b2c2: use IS_REACHABLE() instead of open-coding it 2017-02-03 07:12:59 -02:00
dvb-core [media] add Hama Hybrid DVB-T Stick support 2017-02-08 10:54:58 -02:00
dvb-frontends [media] media: dvb-frontends: constify vb2_ops structure 2017-02-03 14:23:39 -02:00
firewire
i2c [media] et8ek8: Fix compiler / Coccinelle warnings 2017-02-08 10:37:14 -02:00
mmc
pci [media] mantis_dvb: fix some error codes in mantis_dvb_init() 2017-02-03 14:50:35 -02:00
platform [media] media: exynos4-is: add flags to dummy Exynos IS i2c adapter 2017-02-08 10:33:06 -02:00
radio [media] media: radio-cadet, initialize timer with setup_timer 2017-02-03 11:23:51 -02:00
rc [media] mce_kbd: add missing keys from UK layout 2017-02-03 14:23:37 -02:00
spi
tuners [media] mt2060: implement sleep 2017-02-03 06:55:46 -02:00
usb [media] dvb-usb-v2: avoid use-after-free 2017-02-08 11:45:09 -02:00
v4l2-core [media] v4l: of: check for unique lanes in data-lanes and clock-lanes 2017-02-08 10:32:11 -02:00
cec-edid.c
Kconfig
Makefile
media-device.c [media] media: Rename graph and pipeline structs and functions 2017-01-27 16:13:24 -02:00
media-devnode.c
media-entity.c [media] media: entity: Add debug information to graph walk 2017-01-30 11:33:26 -02:00