linux/include/media
Max Kellermann f17c403af9 media: dvbdev: add a mutex protecting the "mdev" pointer
During destruction, a race condition in
dvb_media_controller_disable_source() can cause a kernel crash,
because the "mdev" pointer has been read successfully while another
task executes dvb_usb_media_device_unregister(), which destroys the
object.  Example for such a crash:

    general protection fault: 0000 [#1] SMP
    CPU: 1 PID: 301 Comm: vdr Not tainted 4.8.1-nuc+ #102
    [142B blob data]
    task: ffff8802301f2040 task.stack: ffff880233728000
    RIP: 0010:[<ffffffff816c296b>]  [<ffffffff816c296b>] dvb_frontend_release+0xcb/0x120
    RSP: 0018:ffff88023372bdd8  EFLAGS: 00010202
    RAX: 001fd55c000000da RBX: ffff880236bad810 RCX: 0000000000000000
    RDX: ffff880235bd81f0 RSI: 0000000000000246 RDI: ffff880235bd81e8
    RBP: ffff88023372be00 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: ffff88022f009910 R12: 0000000000000000
    R13: ffff880235a21a80 R14: ffff880235bd8000 R15: ffff880235bb8a78
    FS:  0000000000000000(0000) GS:ffff88023fd00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f96edd69818 CR3: 0000000002406000 CR4: 00000000001006e0
    Stack:
     ffff88022f009900 0000000000000008 ffff880235bb8a78 ffff8802344fbb20
     ffff880236437b40 ffff88023372be48 ffffffff8117a81e ffff880235bb8a78
     ffff88022f009910 ffff8802335a7400 ffff8802301f2040 ffff88022f009900
    Call Trace:
     [<ffffffff8117a81e>] __fput+0xde/0x1d0
     [<ffffffff8117a949>] ____fput+0x9/0x10
     [<ffffffff810a9fce>] task_work_run+0x7e/0xa0
     [<ffffffff81094bab>] do_exit+0x27b/0xa50
     [<ffffffff810407e3>] ? __do_page_fault+0x1c3/0x430
     [<ffffffff81095402>] do_group_exit+0x42/0xb0
     [<ffffffff8109547f>] SyS_exit_group+0xf/0x10
     [<ffffffff8108bedb>] entry_SYSCALL_64_fastpath+0x13/0x8f
    Code: 31 c9 49 8d be e8 01 00 00 ba 01 00 00 00 be 03 00 00 00 e8 68 2d a0 ff 48 8b 83 10 03 00 00 48 8b 80 88 00 00 00 48 85 c0 74 12 <48> 8b 80 88 02 00 00 48 85 c0 74 06 49 8b 7d
    RIP  [<ffffffff816c296b>] dvb_frontend_release+0xcb/0x120

[mchehab+samsung@kernel.org: fix a Coding Style issue]
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-11 12:09:59 -04:00
..
davinci media: platform: davinci: drop VPFE_CMD_S_CCDC_RAW_PARAMS 2017-07-26 06:14:33 -04:00
drv-intf media: include: media: Add Renesas CEU driver interface 2018-02-26 08:59:41 -05:00
i2c MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
tpg media: include/(uapi/)media: add SPDX license info 2018-02-14 13:23:51 -05:00
cec-notifier.h media: include/(uapi/)media: add SPDX license info 2018-02-14 13:23:51 -05:00
cec-pin.h media: include/(uapi/)media: add SPDX license info 2018-02-14 13:23:51 -05:00
cec.h media: cec: improve CEC pin event handling 2018-03-22 08:16:52 -04:00
demux.h media: dvb: update buffer mmaped flags and frame counter 2018-02-23 11:44:08 -05:00
dmxdev.h media: dmxdev: Fix the logic that enables DMA mmap support 2018-02-23 05:27:10 -05:00
dvb_ca_en50221.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dvb_demux.h media: dvb: update buffer mmaped flags and frame counter 2018-02-23 11:44:08 -05:00
dvb_frontend.h media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
dvb_math.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dvb_net.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dvb_ringbuffer.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dvb_vb2.h media: dvb: update buffer mmaped flags and frame counter 2018-02-23 11:44:08 -05:00
dvb-usb-ids.h media: dvb: add alternative USB PID for Hauppauge WinTV-soloHD 2018-05-04 14:20:55 -04:00
dvbdev.h media: dvbdev: add a mutex protecting the "mdev" pointer 2018-05-11 12:09:59 -04:00
imx.h [media] media: Add i.MX media core driver 2017-06-20 07:30:38 -03:00
media-device.h media: media-device: remove driver_version 2017-08-08 06:02:22 -04:00
media-devnode.h ->poll() methods should return __poll_t 2017-11-27 16:19:52 -05:00
media-entity.h media: entity: fix spelling for media_entity_get_fwnode_pad() 2018-05-09 15:49:41 -04:00
rc-core.h media: rc: meson-ir: add timeout on idle 2018-03-21 13:54:51 -04:00
rc-map.h media: rc: add new imon protocol decoder and encoder 2018-03-21 11:12:29 -04:00
rcar-fcp.h v4l: rcar-fcp: Add an API to retrieve the FCP device 2017-06-09 12:25:36 +01:00
soc_camera.h ->poll() methods should return __poll_t 2017-11-27 16:19:52 -05:00
tuner-types.h media: tuner-types: add kernel-doc markups for struct tunertype 2017-12-18 09:06:40 -05:00
tuner.h [media] v4l2-mc.h: move tuner PAD definitions to this new header 2016-02-01 07:19:44 -02:00
tveeprom.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v4l2-async.h media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
v4l2-clk.h media: Convert to using %pOF instead of full_name 2017-08-20 08:20:20 -04:00
v4l2-common.h media: v4l: Bring back array_size parameter to v4l2_find_nearest_size 2018-04-04 06:12:53 -04:00
v4l2-ctrls.h media: v4l2-ctrls.h: fix wrong copy-and-paste comment 2018-02-26 08:03:26 -05:00
v4l2-dev.h media: v4l2-dev.h: fix doc warning 2018-05-09 16:16:27 -04:00
v4l2-device.h media: v4l2-device.h: always expose mdev 2018-05-11 11:26:56 -04:00
v4l2-dv-timings.h media: v4l2-dv-timings: add v4l2_hdmi_colorimetry() 2018-02-22 12:41:09 -05:00
v4l2-event.h media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
v4l2-fh.h media: v4l2_fh.h: add missing kconfig.h include 2018-02-26 08:05:10 -05:00
v4l2-flash-led-class.h media: v4l2-flash-led-class.h: add kernel-doc to two helper funcs 2017-12-18 10:40:41 -05:00
v4l2-fwnode.h media: v4l: fwnode: Fix comment incorrectly mentioning v4l2_fwnode_parse_endpoint 2018-04-23 17:20:07 -04:00
v4l2-image-sizes.h [media] media: v4l2-image-sizes.h: correct the SVGA height definition 2014-12-04 13:56:56 -02:00
v4l2-ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v4l2-mc.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
v4l2-mediabus.h media: v4l2-dev: convert VFL_TYPE_* into an enum 2017-12-18 11:49:40 -05:00
v4l2-mem2mem.h media: annotate ->poll() instances 2017-11-27 16:20:06 -05:00
v4l2-rect.h media: include/(uapi/)media: add SPDX license info 2018-02-14 13:23:51 -05:00
v4l2-subdev.h media: add tuner standby op, use where needed 2018-03-21 12:05:39 -04:00
videobuf-core.h MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
videobuf-dma-contig.h [media] videobuf-dma-contig: remove support for cached mem 2013-04-25 09:50:19 -03:00
videobuf-dma-sg.h MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
videobuf-vmalloc.h MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
videobuf2-core.h media: vb2-core: vb2_ops: document non-interrupt-context calling 2018-03-21 12:01:21 -04:00
videobuf2-dma-contig.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
videobuf2-dma-sg.h [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
videobuf2-dvb.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
videobuf2-memops.h media: vb2: add cross references at memops and v4l2 kernel-doc markups 2017-12-18 12:27:41 -05:00
videobuf2-v4l2.h media updates for v4.16-rc1 2018-02-06 11:27:48 -08:00
videobuf2-vmalloc.h [media] media: videobuf2: Replace videobuf2-core with videobuf2-v4l2 2015-10-01 08:48:18 -03:00
vsp1.h drm: rcar-du: Repair vblank for DRM page flips using the VSP 2017-08-03 16:17:30 +03:00