Bug 1252167

Summary: WARNING: CPU: 1 PID: 813 at kernel/module.c:291 module_assert_mutex_or_preempt+0x49/0x90()
Product: [Fedora] Fedora Reporter: poma <pomidorabelisima>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gansalmon, itamar, jonathan, kernel-maint, labbott, madhu.chinakonda, mchehab
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-21 19:16:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test patch
none
Fix for AF9015 DVB-T USB2.0 stick - broken on boot none

Description poma 2015-08-10 21:10:47 UTC
...
[    1.820797] usb 2-4: new high-speed USB device number 3 using ehci-pci
...
[    1.946014] usb 2-4: New USB device found, idVendor=15a4, idProduct=9016
[    1.946015] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.946017] usb 2-4: Product: DVB-T 2
[    1.946018] usb 2-4: Manufacturer: Afatech
[    1.946019] usb 2-4: SerialNumber: 010101010600001
[    1.951077] Afatech DVB-T 2: Fixing fullspeed to highspeed interval: 10 -> 7
[    1.951872] input: Afatech DVB-T 2 as /devices/pci0000:00/0000:00:04.1/usb2/2-4/2-4:1.1/0003:15A4:9016.0001/input/input5
...
[   40.944872] usb 2-4: dvb_usb_v2: found a 'Afatech AF9015 reference design' in warm state
...
[   41.185333] usb 2-4: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   41.185810] DVB: registering new adapter (Afatech AF9015 reference design)
[   41.194066] i2c i2c-13: af9013: firmware version 5.1.0.0
[   41.198364] usb 2-4: DVB: registering adapter 0 frontend 0 (Afatech AF9013)...
[   41.296684] mxl5007t 13-00c0: creating new instance
[   41.298998] mxl5007t_get_chip_id: unknown rev (3f)
[   41.299240] mxl5007t_get_chip_id: MxL5007T detected @ 13-00c0
[   41.305968] usb 2-4: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   41.307094] DVB: registering new adapter (Afatech AF9015 reference design)
[   41.517111] i2c i2c-13: af9013: found a 'Afatech AF9013' in warm state
[   41.522033] i2c i2c-13: af9013: firmware version 5.1.0.0
[   41.529969] usb 2-4: DVB: registering adapter 1 frontend 0 (Afatech AF9013)...
[   41.530464] mxl5007t 13-00c0: attaching existing instance
.
=========================================================
[   41.532816] usb 2-4: dvb_usb_af9015: command failed=1
[   41.533046] mxl5007t_soft_reset: 521: failed!
[   41.534958] mxl5007t_attach: error -121 on line 907
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    After this the device is already broken
=========================================================
.
[   41.536933] ------------[ cut here ]------------
[   41.537545] WARNING: CPU: 1 PID: 813 at kernel/module.c:291 module_assert_mutex_or_preempt+0x49/0x90()
[   41.538174] Modules linked in: mxl5007t af9013 ... dvb_usb_af9015(+) ... dvb_usb_v2 dvb_core rc_core ...
[   41.542457] CPU: 1 PID: 813 Comm: systemd-udevd Not tainted 4.2.0-0.rc6.git0.1.fc24.x86_64+debug #1
...
[   41.545938] Call Trace:
[   41.546607]  [<ffffffff81868d8e>] dump_stack+0x4c/0x65
[   41.547280]  [<ffffffff810ab406>] warn_slowpath_common+0x86/0xc0
[   41.547959]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.548633]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.549315]  [<ffffffff810ab53a>] warn_slowpath_null+0x1a/0x20
[   41.549994]  [<ffffffff81150529>] module_assert_mutex_or_preempt+0x49/0x90
[   41.550664]  [<ffffffff81150822>] __module_address+0x32/0x150
[   41.551346]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.552037]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.552684]  [<ffffffff81150956>] __module_text_address+0x16/0x70
[   41.553361]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.554049]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.554701]  [<ffffffff81150f19>] symbol_put_addr+0x29/0x40
[   41.555392]  [<ffffffffa04b77ad>] dvb_frontend_detach+0x7d/0x90 [dvb_core]
[   41.556078]  [<ffffffffa04cdfd5>] dvb_usbv2_probe+0xc85/0x11a0 [dvb_usb_v2]
[   41.556750]  [<ffffffffa05607c4>] af9015_probe+0x84/0xf0 [dvb_usb_af9015]
[   41.557483]  [<ffffffff8161c03b>] usb_probe_interface+0x1bb/0x2e0
[   41.558169]  [<ffffffff81579f26>] driver_probe_device+0x1f6/0x450
[   41.558837]  [<ffffffff8157a214>] __driver_attach+0x94/0xa0
[   41.559469]  [<ffffffff8157a180>] ? driver_probe_device+0x450/0x450
[   41.560126]  [<ffffffff815778f3>] bus_for_each_dev+0x73/0xc0
[   41.560748]  [<ffffffff815796fe>] driver_attach+0x1e/0x20
[   41.561442]  [<ffffffff8157922e>] bus_add_driver+0x1ee/0x280
[   41.562088]  [<ffffffff8157b0a0>] driver_register+0x60/0xe0
[   41.562712]  [<ffffffff8161a87d>] usb_register_driver+0xad/0x160
[   41.563348]  [<ffffffffa0567000>] ? 0xffffffffa0567000
[   41.563971]  [<ffffffffa056701e>] af9015_usb_driver_init+0x1e/0x1000 [dvb_usb_af9015]
[   41.564580]  [<ffffffff81002123>] do_one_initcall+0xb3/0x200
[   41.565210]  [<ffffffff8124ac65>] ? kmem_cache_alloc_trace+0x355/0x380
[   41.565834]  [<ffffffff81867c37>] ? do_init_module+0x28/0x1e9
[   41.566428]  [<ffffffff81867c6f>] do_init_module+0x60/0x1e9
[   41.567042]  [<ffffffff81154167>] load_module+0x21f7/0x28d0
[   41.567633]  [<ffffffff8114f600>] ? m_show+0x1b0/0x1b0
[   41.568252]  [<ffffffff81026d79>] ? sched_clock+0x9/0x10
[   41.568861]  [<ffffffff810e6ddc>] ? local_clock+0x1c/0x20
[   41.569453]  [<ffffffff811549b8>] SyS_init_module+0x178/0x1c0
[   41.570059]  [<ffffffff8187282e>] entry_SYSCALL_64_fastpath+0x12/0x76
[   41.570630] ---[ end trace 31a9dd90d4f559f5 ]---
[   41.576081] ------------[ cut here ]------------
[   41.576271] WARNING: CPU: 1 PID: 813 at kernel/module.c:291 module_assert_mutex_or_preempt+0x49/0x90()
[   41.576448] Modules linked in: mxl5007t af9013 ... dvb_usb_af9015(+) ... dvb_usb_v2 dvb_core rc_core ...
[   41.578490] CPU: 1 PID: 813 Comm: systemd-udevd Tainted: G        W       4.2.0-0.rc6.git0.1.fc24.x86_64+debug #1
...
[   41.580427] Call Trace:
[   41.580825]  [<ffffffff81868d8e>] dump_stack+0x4c/0x65
[   41.581198]  [<ffffffff810ab406>] warn_slowpath_common+0x86/0xc0
[   41.581581]  [<ffffffffa03f40d0>] ? mxl5007t_get_if_frequency+0x90/0x90 [mxl5007t]
[   41.581979]  [<ffffffff810ab53a>] warn_slowpath_null+0x1a/0x20
[   41.582356]  [<ffffffff81150529>] module_assert_mutex_or_preempt+0x49/0x90
[   41.582761]  [<ffffffff81150822>] __module_address+0x32/0x150
[   41.583142]  [<ffffffffa03f40d0>] ? mxl5007t_get_if_frequency+0x90/0x90 [mxl5007t]
[   41.583546]  [<ffffffff81150956>] __module_text_address+0x16/0x70
[   41.583960]  [<ffffffffa03f40d0>] ? mxl5007t_get_if_frequency+0x90/0x90 [mxl5007t]
[   41.584350]  [<ffffffff81150f19>] symbol_put_addr+0x29/0x40
[   41.584770]  [<ffffffffa04b7776>] dvb_frontend_detach+0x46/0x90 [dvb_core]
[   41.585161]  [<ffffffffa04cc425>] dvb_usbv2_exit+0x145/0x3c0 [dvb_usb_v2]
[   41.585565]  [<ffffffffa04cd44f>] dvb_usbv2_probe+0xff/0x11a0 [dvb_usb_v2]
[   41.585984]  [<ffffffffa05607c4>] af9015_probe+0x84/0xf0 [dvb_usb_af9015]
[   41.586377]  [<ffffffff8161c03b>] usb_probe_interface+0x1bb/0x2e0
[   41.586793]  [<ffffffff81579f26>] driver_probe_device+0x1f6/0x450
[   41.587191]  [<ffffffff8157a214>] __driver_attach+0x94/0xa0
[   41.587595]  [<ffffffff8157a180>] ? driver_probe_device+0x450/0x450
[   41.588007]  [<ffffffff815778f3>] bus_for_each_dev+0x73/0xc0
[   41.588407]  [<ffffffff815796fe>] driver_attach+0x1e/0x20
[   41.588823]  [<ffffffff8157922e>] bus_add_driver+0x1ee/0x280
[   41.589217]  [<ffffffff8157b0a0>] driver_register+0x60/0xe0
[   41.589618]  [<ffffffff8161a87d>] usb_register_driver+0xad/0x160
[   41.590031]  [<ffffffffa0567000>] ? 0xffffffffa0567000
[   41.590415]  [<ffffffffa056701e>] af9015_usb_driver_init+0x1e/0x1000 [dvb_usb_af9015]
[   41.590829]  [<ffffffff81002123>] do_one_initcall+0xb3/0x200
[   41.591214]  [<ffffffff8124ac65>] ? kmem_cache_alloc_trace+0x355/0x380
[   41.591620]  [<ffffffff81867c37>] ? do_init_module+0x28/0x1e9
[   41.592036]  [<ffffffff81867c6f>] do_init_module+0x60/0x1e9
[   41.592430]  [<ffffffff81154167>] load_module+0x21f7/0x28d0
[   41.592848]  [<ffffffff8114f600>] ? m_show+0x1b0/0x1b0
[   41.593248]  [<ffffffff81026d79>] ? sched_clock+0x9/0x10
[   41.593651]  [<ffffffff810e6ddc>] ? local_clock+0x1c/0x20
[   41.594064]  [<ffffffff811549b8>] SyS_init_module+0x178/0x1c0
[   41.594455]  [<ffffffff8187282e>] entry_SYSCALL_64_fastpath+0x12/0x76
[   41.594854] ---[ end trace 31a9dd90d4f559f6 ]---
[   41.595236] ------------[ cut here ]------------
[   41.595607] WARNING: CPU: 1 PID: 813 at kernel/module.c:291 module_assert_mutex_or_preempt+0x49/0x90()
[   41.595984] Modules linked in: mxl5007t af9013 ... dvb_usb_af9015(+) ... dvb_usb_v2 dvb_core rc_core ...
[   41.598377] CPU: 1 PID: 813 Comm: systemd-udevd Tainted: G        W       4.2.0-0.rc6.git0.1.fc24.x86_64+debug #1
...
[   41.600409] Call Trace:
[   41.600819]  [<ffffffff81868d8e>] dump_stack+0x4c/0x65
[   41.601205]  [<ffffffff810ab406>] warn_slowpath_common+0x86/0xc0
[   41.601601]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.602008]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.602391]  [<ffffffff810ab53a>] warn_slowpath_null+0x1a/0x20
[   41.602786]  [<ffffffff81150529>] module_assert_mutex_or_preempt+0x49/0x90
[   41.603166]  [<ffffffff81150822>] __module_address+0x32/0x150
[   41.603553]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.603957]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.604325]  [<ffffffff81150956>] __module_text_address+0x16/0x70
[   41.604705]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.605101]  [<ffffffffa057d0b0>] ? af9013_read_ucblocks+0x20/0x20 [af9013]
[   41.605467]  [<ffffffff81150f19>] symbol_put_addr+0x29/0x40
[   41.605860]  [<ffffffffa04b77ad>] dvb_frontend_detach+0x7d/0x90 [dvb_core]
[   41.606222]  [<ffffffffa04cc425>] dvb_usbv2_exit+0x145/0x3c0 [dvb_usb_v2]
[   41.606605]  [<ffffffffa04cd44f>] dvb_usbv2_probe+0xff/0x11a0 [dvb_usb_v2]
[   41.606997]  [<ffffffffa05607c4>] af9015_probe+0x84/0xf0 [dvb_usb_af9015]
[   41.607369]  [<ffffffff8161c03b>] usb_probe_interface+0x1bb/0x2e0
[   41.607761]  [<ffffffff81579f26>] driver_probe_device+0x1f6/0x450
[   41.608138]  [<ffffffff8157a214>] __driver_attach+0x94/0xa0
[   41.608524]  [<ffffffff8157a180>] ? driver_probe_device+0x450/0x450
[   41.608914]  [<ffffffff815778f3>] bus_for_each_dev+0x73/0xc0
[   41.609289]  [<ffffffff815796fe>] driver_attach+0x1e/0x20
[   41.609665]  [<ffffffff8157922e>] bus_add_driver+0x1ee/0x280
[   41.610054]  [<ffffffff8157b0a0>] driver_register+0x60/0xe0
[   41.610416]  [<ffffffff8161a87d>] usb_register_driver+0xad/0x160
[   41.610796]  [<ffffffffa0567000>] ? 0xffffffffa0567000
[   41.611162]  [<ffffffffa056701e>] af9015_usb_driver_init+0x1e/0x1000 [dvb_usb_af9015]
[   41.611540]  [<ffffffff81002123>] do_one_initcall+0xb3/0x200
[   41.611930]  [<ffffffff8124ac65>] ? kmem_cache_alloc_trace+0x355/0x380
[   41.612309]  [<ffffffff81867c37>] ? do_init_module+0x28/0x1e9
[   41.612698]  [<ffffffff81867c6f>] do_init_module+0x60/0x1e9
[   41.613096]  [<ffffffff81154167>] load_module+0x21f7/0x28d0
[   41.613470]  [<ffffffff8114f600>] ? m_show+0x1b0/0x1b0
[   41.613864]  [<ffffffff81026d79>] ? sched_clock+0x9/0x10
[   41.614230]  [<ffffffff810e6ddc>] ? local_clock+0x1c/0x20
[   41.614595]  [<ffffffff811549b8>] SyS_init_module+0x178/0x1c0
[   41.614952]  [<ffffffff8187282e>] entry_SYSCALL_64_fastpath+0x12/0x76
[   41.615285] ---[ end trace 31a9dd90d4f559f7 ]---
[   41.616234] usbcore: registered new interface driver dvb_usb_af9015
...

Comment 1 Laura Abbott 2015-08-18 04:32:31 UTC
Created attachment 1064161 [details]
test patch

Can you test the following patch from Peter Z?

Comment 2 poma 2015-08-18 17:08:55 UTC
$ dmesg | egrep 1-2\|dvb\|mxl
[    1.538292] usb 1-2: new high-speed USB device number 3 using ehci-pci
[    1.663066] usb 1-2: New USB device found, idVendor=15a4, idProduct=9016
[    1.665385] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.667691] usb 1-2: Product: DVB-T 2
[    1.669957] usb 1-2: Manufacturer: Afatech
[    1.672197] usb 1-2: SerialNumber: 010101010600001
[    1.681707] input: Afatech DVB-T 2 as /devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.1/0003:15A4:9016.0001/input/input5
[    1.734659] hid-generic 0003:15A4:9016.0001: input,hidraw0: USB HID v1.01 Keyboard [Afatech DVB-T 2] on usb-0000:00:02.1-2/input1
[   17.500729] usb 1-2: dvb_usb_v2: found a 'Afatech AF9015 reference design' in warm state
[   17.742778] usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   17.782667] usb 1-2: DVB: registering adapter 0 frontend 0 (Afatech AF9013)...
[   17.832182] mxl5007t 13-00c0: creating new instance
[   17.834967] mxl5007t_get_chip_id: unknown rev (3f)
[   17.835169] mxl5007t_get_chip_id: MxL5007T detected @ 13-00c0
[   17.842928] usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   18.062975] usb 1-2: DVB: registering adapter 1 frontend 0 (Afatech AF9013)...
[   18.063561] mxl5007t 13-00c0: attaching existing instance
[   18.066364] usb 1-2: dvb_usb_af9015: command failed=1
[   18.067045] mxl5007t_soft_reset: 521: failed!
[   18.069464] mxl5007t_attach: error -121 on line 907
[   18.084479] usbcore: registered new interface driver dvb_usb_af9015
$ ls /dev/dvb
ls: cannot access /dev/dvb: No such file or directory
$ uname -r
4.2.0-0.rc7.git0.4.fc24.x86_64+debug

Comment 3 Laura Abbott 2015-08-19 01:15:51 UTC
Okay the warning splat is gone which was what the patch was fixing. I suggest treating the bootup issue with the adapter as a separate bugzilla for tracking and leaving this one for the module_assert_mutex_or_preempt warning. If this was working previously, please indicate the last kernel that worked.

When I reply back upstream about the patch, do you want a Tested-by credit?

Comment 4 poma 2015-08-19 06:15:07 UTC
Tested-by: poma <pomidorabelisima>

Comment 5 poma 2015-08-19 08:26:53 UTC
One note, perhaps significant, these WARNINGs are occurring with this particular device, not with others that I tested.

As I have already mentioned, the dual tuner combination driven by dvb_usb_af9015 & mxl5007t is broken by design, since day one.

The last issue - broken on boot, is an escalation of the same.

From my perspective, these WARNINGs are only a reflection of that.

Comment 6 poma 2015-08-19 08:31:42 UTC
Therefore, this may well be that it is not a different issue at all.

Comment 7 poma 2015-08-20 01:05:15 UTC
Created attachment 1065058 [details]
Fix for AF9015 DVB-T USB2.0 stick - broken on boot


$ dmesg | egrep 1-2\|dvb\|mxl
[    1.544000] usb 1-2: new high-speed USB device number 3 using ehci-pci
[    1.673030] usb 1-2: New USB device found, idVendor=15a4, idProduct=9016
[    1.673032] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.673034] usb 1-2: Product: DVB-T 2
[    1.673035] usb 1-2: Manufacturer: Afatech
[    1.673036] usb 1-2: SerialNumber: 010101010600001
[    1.680026] input: Afatech DVB-T 2 as /devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.1/0003:15A4:9016.0001/input/input5
[    1.737584] hid-generic 0003:15A4:9016.0001: input,hidraw0: USB HID v1.01 Keyboard [Afatech DVB-T 2] on usb-0000:00:02.1-2/input1
[   19.163681] usb 1-2: dvb_usb_v2: found a 'Afatech AF9015 reference design' in warm state
[   19.399240] usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   19.455010] usb 1-2: DVB: registering adapter 0 frontend 0 (Afatech AF9013)...
[   19.495350] mxl5007t 13-00c0: creating new instance
[   19.497770] mxl5007t_get_chip_id: unknown rev (3f)
[   19.498030] mxl5007t_get_chip_id: MxL5007T detected @ 13-00c0
[   19.499368] usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   19.717559] usb 1-2: DVB: registering adapter 1 frontend 0 (Afatech AF9013)...
[   19.718324] mxl5007t 13-00c0: attaching existing instance
[   19.736909] input: Afatech AF9015 reference design as /devices/pci0000:00/0000:00:02.1/usb1/1-2/rc/rc0/input14
[   19.738504] rc0: Afatech AF9015 reference design as /devices/pci0000:00/0000:00:02.1/usb1/1-2/rc/rc0
[   19.738789] usb 1-2: dvb_usb_v2: schedule remote query interval to 500 msecs
[   19.739073] usb 1-2: dvb_usb_v2: 'Afatech AF9015 reference design' successfully initialized and connected
[   19.739619] usbcore: registered new interface driver dvb_usb_af9015

$ ls -R /dev/dvb
/dev/dvb:
adapter0  adapter1

/dev/dvb/adapter0:
demux0  dvr0  frontend0  net0

/dev/dvb/adapter1:
demux0  dvr0  frontend0  net0

$ uname -r
4.2.0-0.rc7.git2.4.fc24.x86_64+debug

Comment 8 poma 2015-08-20 08:11:25 UTC
Indeed it is not a different issue, as you can see.

Comment 9 poma 2015-08-21 10:36:15 UTC
Laura Abbott, I'm pretty sure that your intentions were benevolent here, you're probably just wanted to help.

But what you all did - you, Peter Zijlstra and Rusty Russell, is just not right.

If you think it's OK to ignore me as the original reporter, man.