Re: [PATCH v8 54/55] [media] au0828: unregister MC at the end

2015-09-04 Thread Mauro Carvalho Chehab
Em Mon, 31 Aug 2015 15:25:39 +0200
Hans Verkuil  escreveu:

> On 08/30/2015 05:07 AM, Mauro Carvalho Chehab wrote:
> > au0828_analog_unregister() calls video_unregister_device(),
> > with, in turn, calls media_devnode_remove() in order to drop
> > the media interfaces.
> > 
> > We can't release the media controller before that, or an
> > OOPS will occur:
> 
> So this patch should be moved to a place earlier in the patch series,
> right? To prevent bisects that hit this bug.

Yes, it should be before the previous patch.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 54/55] [media] au0828: unregister MC at the end

2015-08-31 Thread Hans Verkuil
On 08/30/2015 05:07 AM, Mauro Carvalho Chehab wrote:
> au0828_analog_unregister() calls video_unregister_device(),
> with, in turn, calls media_devnode_remove() in order to drop
> the media interfaces.
> 
> We can't release the media controller before that, or an
> OOPS will occur:

So this patch should be moved to a place earlier in the patch series,
right? To prevent bisects that hit this bug.

Regards,

Hans

> 
> [  176.938752] usb 1-4.4: Media device released
> [  176.938753] usb 1-4.4: Media device unregistered
> [  177.091235] general protection fault:  [#1] SMP
> [  177.091253] Modules linked in: ir_lirc_codec ir_xmp_decoder lirc_dev 
> ir_mce_kbd_decoder ir_sharp_decoder ir_sanyo_decoder ir_sony_decoder 
> ir_jvc_decoder ir_rc6_decoder ir_nec_decoder ir_rc5_decoder au8522_dig xc5000 
> tuner au8522_decoder au8522_common au0828(-) videobuf2_vmalloc 
> videobuf2_memops tveeprom videobuf2_core dvb_core rc_core v4l2_common 
> videodev media cpufreq_powersave cpufreq_conservative cpufreq_userspace 
> cpufreq_stats parport_pc ppdev lp parport snd_hda_codec_hdmi i915 
> x86_pkg_temp_thermal intel_powerclamp intel_rapl iosf_mbi coretemp kvm_intel 
> kvm btusb crct10dif_pclmul snd_hda_codec_realtek crc32_pclmul btrtl 
> crc32c_intel btbcm snd_hda_codec_generic ghash_clmulni_intel btintel 
> i2c_algo_bit drm_kms_helper bluetooth iTCO_wdt snd_usb_audio snd_hda_intel 
> iTCO_vendor_support jitterentropy_rng
> [  177.091455]  snd_hda_codec evdev sha256_ssse3 drm sha256_generic hmac 
> snd_usbmidi_lib snd_hwdep snd_hda_core snd_rawmidi drbg snd_seq_device 
> snd_pcm aesni_intel aes_x86_64 lrw gf128mul mei_me glue_helper snd_timer 
> ablk_helper cryptd mei rfkill snd psmouse sg shpchp soundcore lpc_ich 
> serio_raw i2c_i801 pcspkr mfd_core tpm_tis tpm battery dw_dmac video 
> i2c_designware_platform dw_dmac_core i2c_designware_core acpi_pad processor 
> button ext4 crc16 mbcache jbd2 dm_mod sd_mod ahci libahci libata e1000e 
> scsi_mod ptp pps_core ehci_pci xhci_pci ehci_hcd xhci_hcd thermal fan 
> thermal_sys sdhci_acpi sdhci mmc_core i2c_hid hid [last unloaded: rc_core]
> [  177.091632] CPU: 1 PID: 18040 Comm: rmmod Tainted: GW   
> 4.2.0-rc2+ #9
> [  177.091648] Hardware name: 
> \x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x
>  
> \x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x/NUC5i7RYB,
>  BIOS RYBDWi35.86A.0246.2015.0309.1355 03/09/2015
> [  177.091677] task: 88040811b080 ti: 880036b88000 task.ti: 
> 880036b88000
> [  177.091693] RIP: 0010:[]  [] 
> native_queued_spin_lock_slowpath+0x103/0x180
> [  177.091718] RSP: 0018:880036b8bcd8  EFLAGS: 00010202
> [  177.091730] RAX: 3ffe RBX: 880407e11b70 RCX: 
> 88041ec962c0
> [  177.091745] RDX: 7463656a62506357 RSI: 0008 RDI: 
> 880407e11b74
> [  177.091760] RBP: 880407e11b74 R08: 0001 R09: 
> 812bf4e0
> [  177.091776] R10:  R11:  R12: 
> 88040811b080
> [  177.091791] R13: 88003601cec8 R14: 8804084b8890 R15: 
> 8804084b8800
> [  177.091807] FS:  7f2f9bab1700() GS:88041ec8() 
> knlGS:
> [  177.091824] CS:  0010 DS:  ES:  CR0: 80050033
> [  177.091837] CR2: 7fe8c0f900e0 CR3: 35c47000 CR4: 
> 003407e0
> [  177.091852] Stack:
> [  177.091857]  81562e3d 815613b3  
> 
> [  177.091876]  88040b6d3240 8804084b8890 880407e11b70 
> 88003601cd30
> [  177.091895]  88003601ce28 88003601cec8 8804084b8890 
> 8156148b
> [  177.091914] Call Trace:
> [  177.091923]  [] ? _raw_spin_lock+0x1d/0x20
> [  177.091936]  [] ? __mutex_lock_slowpath+0x43/0x100
> [  177.091951]  [] ? mutex_lock+0x1b/0x30
> [  177.091965]  [] ? media_remove_intf_links+0x1d/0x40 
> [media]
> [  177.091981]  [] ? media_devnode_remove+0xe/0x20 [media]
> [  177.091997]  [] ? v4l2_device_release+0x95/0x100 
> [videodev]
> [  177.092014]  [] ? device_release+0x2d/0x90
> [  177.092028]  [] ? kobject_release+0x79/0x1b0
> [  177.092042]  [] ? au0828_analog_unregister+0x2a/0x60 
> [au0828]
> [  177.092059]  [] ? au0828_usb_disconnect+0x9e/0xd0 
> [au0828]
> [  177.092075]  [] ? usb_unbind_interface+0x79/0x270
> [  177.092090]  [] ? __device_release_driver+0x95/0x130
> [  177.092105]  [] ? driver_detach+0xab/0xb0
> [  177.092120]  [] ? bus_remove_driver+0x55/0xd0
> 

[PATCH v8 54/55] [media] au0828: unregister MC at the end

2015-08-29 Thread Mauro Carvalho Chehab
au0828_analog_unregister() calls video_unregister_device(),
with, in turn, calls media_devnode_remove() in order to drop
the media interfaces.

We can't release the media controller before that, or an
OOPS will occur:

[  176.938752] usb 1-4.4: Media device released
[  176.938753] usb 1-4.4: Media device unregistered
[  177.091235] general protection fault:  [#1] SMP
[  177.091253] Modules linked in: ir_lirc_codec ir_xmp_decoder lirc_dev 
ir_mce_kbd_decoder ir_sharp_decoder ir_sanyo_decoder ir_sony_decoder 
ir_jvc_decoder ir_rc6_decoder ir_nec_decoder ir_rc5_decoder au8522_dig xc5000 
tuner au8522_decoder au8522_common au0828(-) videobuf2_vmalloc videobuf2_memops 
tveeprom videobuf2_core dvb_core rc_core v4l2_common videodev media 
cpufreq_powersave cpufreq_conservative cpufreq_userspace cpufreq_stats 
parport_pc ppdev lp parport snd_hda_codec_hdmi i915 x86_pkg_temp_thermal 
intel_powerclamp intel_rapl iosf_mbi coretemp kvm_intel kvm btusb 
crct10dif_pclmul snd_hda_codec_realtek crc32_pclmul btrtl crc32c_intel btbcm 
snd_hda_codec_generic ghash_clmulni_intel btintel i2c_algo_bit drm_kms_helper 
bluetooth iTCO_wdt snd_usb_audio snd_hda_intel iTCO_vendor_support 
jitterentropy_rng
[  177.091455]  snd_hda_codec evdev sha256_ssse3 drm sha256_generic hmac 
snd_usbmidi_lib snd_hwdep snd_hda_core snd_rawmidi drbg snd_seq_device snd_pcm 
aesni_intel aes_x86_64 lrw gf128mul mei_me glue_helper snd_timer ablk_helper 
cryptd mei rfkill snd psmouse sg shpchp soundcore lpc_ich serio_raw i2c_i801 
pcspkr mfd_core tpm_tis tpm battery dw_dmac video i2c_designware_platform 
dw_dmac_core i2c_designware_core acpi_pad processor button ext4 crc16 mbcache 
jbd2 dm_mod sd_mod ahci libahci libata e1000e scsi_mod ptp pps_core ehci_pci 
xhci_pci ehci_hcd xhci_hcd thermal fan thermal_sys sdhci_acpi sdhci mmc_core 
i2c_hid hid [last unloaded: rc_core]
[  177.091632] CPU: 1 PID: 18040 Comm: rmmod Tainted: GW   
4.2.0-rc2+ #9
[  177.091648] Hardware name: 
\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x
 
\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x\x/NUC5i7RYB,
 BIOS RYBDWi35.86A.0246.2015.0309.1355 03/09/2015
[  177.091677] task: 88040811b080 ti: 880036b88000 task.ti: 
880036b88000
[  177.091693] RIP: 0010:[810aecc3]  [810aecc3] 
native_queued_spin_lock_slowpath+0x103/0x180
[  177.091718] RSP: 0018:880036b8bcd8  EFLAGS: 00010202
[  177.091730] RAX: 3ffe RBX: 880407e11b70 RCX: 88041ec962c0
[  177.091745] RDX: 7463656a62506357 RSI: 0008 RDI: 880407e11b74
[  177.091760] RBP: 880407e11b74 R08: 0001 R09: 812bf4e0
[  177.091776] R10:  R11:  R12: 88040811b080
[  177.091791] R13: 88003601cec8 R14: 8804084b8890 R15: 8804084b8800
[  177.091807] FS:  7f2f9bab1700() GS:88041ec8() 
knlGS:
[  177.091824] CS:  0010 DS:  ES:  CR0: 80050033
[  177.091837] CR2: 7fe8c0f900e0 CR3: 35c47000 CR4: 003407e0
[  177.091852] Stack:
[  177.091857]  81562e3d 815613b3  

[  177.091876]  88040b6d3240 8804084b8890 880407e11b70 
88003601cd30
[  177.091895]  88003601ce28 88003601cec8 8804084b8890 
8156148b
[  177.091914] Call Trace:
[  177.091923]  [81562e3d] ? _raw_spin_lock+0x1d/0x20
[  177.091936]  [815613b3] ? __mutex_lock_slowpath+0x43/0x100
[  177.091951]  [8156148b] ? mutex_lock+0x1b/0x30
[  177.091965]  [a028480d] ? media_remove_intf_links+0x1d/0x40 [media]
[  177.091981]  [a028483e] ? media_devnode_remove+0xe/0x20 [media]
[  177.091997]  [a063d875] ? v4l2_device_release+0x95/0x100 [videodev]
[  177.092014]  [813ca19d] ? device_release+0x2d/0x90
[  177.092028]  [812be5e9] ? kobject_release+0x79/0x1b0
[  177.092042]  [a07b19ea] ? au0828_analog_unregister+0x2a/0x60 
[au0828]
[  177.092059]  [a07ac10e] ? au0828_usb_disconnect+0x9e/0xd0 [au0828]
[  177.092075]  [8140e609] ? usb_unbind_interface+0x79/0x270
[  177.092090]  [813cf285] ? __device_release_driver+0x95/0x130
[  177.092105]  [813cf41b] ? driver_detach+0xab/0xb0
[  177.092120]  [813ce4c5] ? bus_remove_driver+0x55/0xd0
[  177.092134]  [8140d951] ? usb_deregister+0x71/0xc0
[  177.092148]  [810e438a] ?