linux_dsm_epyc7002/drivers/media/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
..
airspy media: usb: make video_device const 2017-08-27 08:45:32 -04:00
as102 media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
au0828 media: add tuner standby op, use where needed 2018-03-21 12:05:39 -04:00
b2c2 media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
cpia2 media: cpia2_usb: drop bogus interface-release call 2018-03-21 12:12:04 -04:00
cx231xx media: usb: cx231xx-417: include linux/slab.h header 2018-05-11 11:37:57 -04:00
dvb-usb media: dvbdev: add a mutex protecting the "mdev" pointer 2018-05-11 12:09:59 -04:00
dvb-usb-v2 media: dvbsky: use just one mutex for serializing device R/W ops 2018-05-10 07:05:14 -04:00
em28xx media: em28xx: Demote several dev_err to dev_info 2018-05-11 11:30:38 -04:00
go7007 media: usb: don't initialize vars if not needed 2018-03-06 10:39:59 -05:00
gspca Linux 4.17-rc4 2018-05-10 07:19:23 -04:00
hackrf media: hackrf: group device capabilities 2018-05-11 11:25:23 -04:00
hdpvr vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
msi2500 media: usb: fix spelling mistake: "synchronuously" -> "synchronously" 2017-11-07 03:47:09 -05:00
pulse8-cec media: pulse8-cec: print time using time64_t 2017-12-08 11:08:22 -05:00
pvrusb2 media: pvrusb2: delete unneeded include 2018-05-09 16:28:19 -04:00
pwc media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
rainshadow-cec media: usb: rainshadow-cec: constify serio_device_id 2017-08-20 08:27:29 -04:00
s2255 media: s2255drv: fix a casting warning 2018-03-23 06:56:55 -04:00
siano media: siano: Fix coherent memory allocation failure on arm64 2018-03-06 12:46:15 -05:00
stk1160 media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
stkwebcam vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
tm6000 MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
ttusb-budget media updates for v4.16-rc1 2018-02-06 11:27:48 -08:00
ttusb-dec media: dvb: update buffer mmaped flags and frame counter 2018-02-23 11:44:08 -05:00
usbtv media: usbtv: Use the constant for supported standards 2018-05-04 06:53:11 -04:00
usbvision media: media/usbvision: fix spelling mistake: "compresion" -> "compression" 2018-05-09 16:24:02 -04:00
uvc media: uvc: to the right check at uvc_ioctl_enum_framesizes() 2018-03-23 08:37:27 -04:00
zr364xx media: zr364xx: avoid casting just to print pointer address 2018-03-23 07:31:59 -04:00
Kconfig [media] rainshadow-cec: new RainShadow Tech HDMI CEC driver 2017-04-10 12:42:10 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00