linux/drivers/media/usb/dvb-usb
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
..
a800.c [media] media: dvb: a800: port to rc-core 2017-10-04 15:19:58 -03:00
af9005-fe.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
af9005-remote.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
af9005-script.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
af9005.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
af9005.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
az6027.c media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
az6027.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cinergyT2-core.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
cinergyT2-fe.c media: drivers: remove "/**" from non-kernel-doc comments 2017-11-30 04:19:03 -05:00
cinergyT2.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
cxusb.c media: lgdt330x: convert it to the new I2C binding way 2018-05-04 11:09:26 -04:00
cxusb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dib07x0.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dib0700_core.c media: dib0700: add support for Xbox One Digital TV Tuner 2017-12-13 08:16:53 -05:00
dib0700_devices.c media: s5h14*.h: fix typos for CONTINUOUS 2018-03-06 05:15:02 -05:00
dib0700.h media: dib0700: add support for Xbox One Digital TV Tuner 2017-12-13 08:16:53 -05:00
dibusb-common.c media: dvb: i2c transfers over usb cannot be done from stack 2017-11-30 04:39:32 -05:00
dibusb-mb.c
dibusb-mc-common.c [media] dvb-usb-dibusb-mc-common: Add MODULE_LICENSE 2017-04-17 12:11:13 -03:00
dibusb-mc.c
dibusb.h [media] dibusb: don't do DMA on stack 2016-10-14 12:38:34 -03:00
digitv.c [media] digitv: limit messages to buffer size 2017-04-18 12:52:41 -03:00
digitv.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dtt200u-fe.c [media] dvb: make DVB frontend *_ops instances "const" 2016-11-18 15:00:22 -02:00
dtt200u.c media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_* 2017-08-20 10:02:48 -04:00
dtt200u.h
dtv5100.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dtv5100.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb-usb-common.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dvb-usb-dvb.c media: dvbdev: add a mutex protecting the "mdev" pointer 2018-05-11 12:09:59 -04:00
dvb-usb-firmware.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dvb-usb-i2c.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dvb-usb-init.c dvb-usb: move data_mutex to struct dvb_usb_device 2016-11-13 10:02:22 -08:00
dvb-usb-remote.c media updates for v4.15-rc1 2017-11-15 20:30:12 -08:00
dvb-usb-urb.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dvb-usb.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dw2102.c media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dw2102.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
friio-fe.c media: use ARRAY_SIZE 2017-12-08 10:11:00 -05:00
friio.c media: drivers: remove "/**" from non-kernel-doc comments 2017-11-30 04:19:03 -05:00
friio.h
gp8psk.c [media] gp8psk: make local symbol gp8psk_fe_ops static 2017-02-03 14:23:34 -02:00
gp8psk.h gp8psk: Fix DVB frontend attach 2016-11-13 10:02:22 -08:00
Kconfig media: dib0700: add support for Xbox One Digital TV Tuner 2017-12-13 08:16:53 -05:00
m920x.c media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_* 2017-08-20 10:02:48 -04:00
m920x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
nova-t-usb2.c [media] nova-t-usb2: handle error code on RC query 2016-10-14 12:52:25 -03:00
opera1.c [media] dvb-usb: don't break long lines 2016-10-21 09:39:51 -02:00
pctv452e.c media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
technisat-usb2.c media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_* 2017-08-20 10:02:48 -04:00
ttusb2.c media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
ttusb2.h
umt-010.c
usb-urb.c media: dvb-usb: Replace GFP_ATOMIC with GFP_KERNEL 2018-05-05 07:37:36 -04:00
vp702x-fe.c [media] dvb: make DVB frontend *_ops instances "const" 2016-11-18 15:00:22 -02:00
vp702x.c
vp702x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vp7045-fe.c [media] dvb: make DVB frontend *_ops instances "const" 2016-11-18 15:00:22 -02:00
vp7045.c [media] media: vp7045: port TwinhanDTV Alpha to rc-core 2017-10-04 15:25:13 -03:00
vp7045.h