2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 14:14:01 +08:00
linux-next/drivers/media/usb/au0828
Mauro Carvalho Chehab a087ce704b [media] media-device: dynamically allocate struct media_devnode
struct media_devnode is currently embedded at struct media_device.

While this works fine during normal usage, it leads to a race
condition during devnode unregister. the problem is that drivers
assume that, after calling media_device_unregister(), the struct
that contains media_device can be freed. This is not true, as it
can't be freed until userspace closes all opened /dev/media devnodes.

In other words, if the media devnode is still open, and media_device
gets freed, any call to an ioctl will make the core to try to access
struct media_device, with will cause an use-after-free and even GPF.

Fix this by dynamically allocating the struct media_devnode and only
freeing it when it is safe.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-15 17:57:24 -03:00
..
au0828-cards.c [media] au0828: disable tuner links and cache tuner/decoder 2016-03-31 14:50:38 -03:00
au0828-cards.h
au0828-core.c [media] media-device: dynamically allocate struct media_devnode 2016-06-15 17:57:24 -03:00
au0828-dvb.c [media] au0828: Refactoring for start_urb_transfer() 2016-02-01 07:39:25 -02:00
au0828-i2c.c [media] au0828: use pr_foo macros 2014-08-21 15:25:08 -05:00
au0828-input.c [media] au0828: Fix dev_state handling 2016-03-31 15:01:35 -03:00
au0828-reg.h
au0828-vbi.c [media] vb2: drop v4l2_format argument from queue_setup 2015-12-18 13:48:19 -02:00
au0828-video.c [media] media: au0828 fix au0828_v4l2_device_register() to not unlock and free 2016-05-09 13:20:42 -03:00
au0828.h [media] au0828: remove unused macro 2016-04-13 17:13:00 -03:00
Kconfig [media] media: au0828 - convert to use videobuf2 2015-02-02 11:58:27 -02:00
Makefile [media] au0828: add support for IR on HVR-950Q 2014-07-30 15:51:43 -03:00