kernel_optimize_test/drivers/media/usb/cx231xx
Alexey Khoroshilov 256d013a9b [media] cx231xx: fix double free and leaks on failure path in cx231xx_usb_probe()
There are numerous issues in error handling code of cx231xx initialization.
Double free (when cx231xx_init_dev() calls kfree(dev) via cx231xx_release_resources()
and then cx231xx_usb_probe() does the same) and memory leaks
(e.g. usb_get_dev() before (ifnum != 1) check in cx231xx_usb_probe())
are just a few of them.
The patch fixes the issues in cx231xx_usb_probe() and cx231xx_init_dev()
by moving usb_get_dev(interface_to_usbdev(interface)) below in code and
implementing proper error handling.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 06:05:28 -03:00
..
cx231xx-417.c [media] cx231xx: remove g_chip_ident 2013-06-17 08:45:43 -03:00
cx231xx-audio.c [media] cx231xx: fix big-endian problems 2013-03-05 14:26:07 -03:00
cx231xx-avcore.c [media] cx231xx: remove g_chip_ident 2013-06-17 08:45:43 -03:00
cx231xx-cards.c [media] cx231xx: fix double free and leaks on failure path in cx231xx_usb_probe() 2013-10-17 06:05:28 -03:00
cx231xx-conf-reg.h
cx231xx-core.c [media] cx231xx: fix big-endian problems 2013-03-05 14:26:07 -03:00
cx231xx-dif.h
cx231xx-dvb.c [media] cx231xx: Add support for KWorld UB445-U 2013-08-23 05:42:33 -03:00
cx231xx-i2c.c
cx231xx-input.c
cx231xx-pcb-cfg.c [media] cx231xx: fix sparse warnings 2013-10-15 13:00:25 -03:00
cx231xx-pcb-cfg.h [media] media/usb: cx231xx-pcb-cfg.h: Remove unused enum _true_false 2013-03-14 11:46:07 -03:00
cx231xx-reg.h
cx231xx-vbi.c [media] cx231xx: remove g_chip_ident 2013-06-17 08:45:43 -03:00
cx231xx-vbi.h
cx231xx-video.c [media] cx231xx: the reg->size field wasn't filled in 2013-06-17 08:55:19 -03:00
cx231xx.h [media] cx231xx: Add support for KWorld UB445-U 2013-08-23 05:42:33 -03:00
Kconfig
Makefile