Hi, I am trying to figure out why the smsxxx MiniStick isn't unregistered correctly when I pull out the stick while kaffeine is playing. It gets as far as calling smsdvb_unregister_client dvb_unregister_frontend where it hangs at if (fepriv->dvbdev->users < -1) wait_event(fepriv->dvbdev->wait_queue, fepriv->dvbdev->users==-1); When I move dvb_unregister_frontend further down, after dvb_dmxdev_release() and dvb_dmx_release() the deadlock is resolved. Pluging the stick back in and repeating the process results in an Ooops in the kdvb-ad thread however, which appears pretty exactly repeatable: Dec 8 22:31:55 localhost kernel: [24035.987045] BUG: unable to handle kernel paging request at 016a2cef Dec 8 22:31:55 localhost kernel: [24035.987052] IP: [<c11d486b>] do_raw_spin_lock+0xb/0x104 Dec 8 22:31:55 localhost kernel: [24035.987062] *pde = 00000000 Dec 8 22:31:55 localhost kernel: [24035.987065] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC Dec 8 22:31:55 localhost kernel: [24035.987069] last sysfs file: /sys/devices/platform/coretemp.1/temp1_input Dec 8 22:31:55 localhost kernel: [24035.987074] Modules linked in: smsdvb dvb_core rc_rc5_hauppauge_new ir_lirc_codec lirc_dev ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder smsusb ir_nec_decoder smsmdtv ir_core ppp_deflate ppp_async crc_ccitt ppp_generic slhc fuse i915 drm_kms_helper drm i2c_algo_bit video output nfsd lockd nfs_acl auth_rpcgss exportfs autofs4 coretemp w83627ehf hwmon_vid hwmon tun sunrpc xt_multiport nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp ipt_LOG xt_limit iptable_filter ip_tables x_tables ipv6 binfmt_misc dm_multipath snd_hda_codec_realtek snd_hda_intel deflate snd_hda_codec zlib_deflate ctr twofish_generic twofish_i586 twofish_common camellia rt2500usb arc4 snd_hwdep serpent ecb snd_seq_dummy snd_seq_oss blowfish cast5 des_generic snd_seq_midi_event xcbc snd_seq rmd160 sha512_generic snd_seq_device rt73usb snd_pcm_oss crc_itu_t crypto_null rt2x00usb snd_mixer_oss rt2x00lib snd_pcm iTCO_wdt iTCO_vendor_support snd_timer mac80211 i2c_i801 option snd intel_aDec 8 22:31:55 localhost kernel: gp i2c_core cfg80211 soundcore agpgart usb_wwan led_class psmouse snd_page_alloc r8169 ppdev mac_hid rfkill usbserial parport_pc mii processor button parport rtc_cmos pcspkr thermal evbug serio_raw piix ata_generic ide_pci_generic pata_acpi sha256_generic cbc aes_i586 aes_generic dm_crypt dm_snapshot dm_zero dm_mirror dm_region_hash dm_log dm_mod ehci_hcd [last unloaded: microcode] Dec 8 22:31:55 localhost kernel: [24035.987199] Dec 8 22:31:55 localhost kernel: [24035.987199] Dec 8 22:31:55 localhost kernel: [24035.987203] Pid: 22798, comm: kdvb-ad-0-fe-0 Not tainted 2.6.36.1v1 #4 945GCM-S/To Be Filled By O.E.M. Dec 8 22:31:55 localhost kernel: [24035.987206] EIP: 0060:[<c11d486b>] EFLAGS: 00010086 CPU: 1 Dec 8 22:31:55 localhost kernel: [24035.987209] EIP is at do_raw_spin_lock+0xb/0x104 Dec 8 22:31:55 localhost kernel: [24035.987211] EAX: 016a2ceb EBX: 016a2ceb ECX: 00000000 EDX: 00000000 Dec 8 22:31:55 localhost kernel: [24035.987214] ESI: 00000246 EDI: 016a2ceb EBP: f134be98 ESP: f134be78 Dec 8 22:31:55 localhost kernel: [24035.987216] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 Dec 8 22:31:55 localhost kernel: [24035.987219] Process kdvb-ad-0-fe-0 (pid: 22798, ti=f134a000 task=f036c800 task.ti=f134a000) Dec 8 22:31:55 localhost kernel: [24035.987221] Stack: Dec 8 22:31:55 localhost kernel: [24035.987223] f9a92613 00000000 c104095d 00000000 016a2cfb 016a2ceb 00000246 016a2ceb Dec 8 22:31:55 localhost kernel: [24035.987230] <0> f134beb8 c13705f9 00000000 00000002 00000000 f9a92613 016a2cd3 00000000 Dec 8 22:31:55 localhost kernel: [24035.987238] <0> f134bedc f9a92613 000000c9 00000000 00000286 f134bf14 f006eb20 00000000 Dec 8 22:31:55 localhost kernel: [24035.987246] Call Trace: Dec 8 22:31:55 localhost kernel: [24035.987254] [<f9a92613>] ? smscore_find_client+0x3c/0x8f [smsmdtv] Dec 8 22:31:55 localhost kernel: [24035.987260] [<c104095d>] ? lock_timer_base+0x1f/0x3e Dec 8 22:31:55 localhost kernel: [24035.987266] [<c13705f9>] ? _raw_spin_lock_irqsave+0x36/0x3f Dec 8 22:31:55 localhost kernel: [24035.987271] [<f9a92613>] ? smscore_find_client+0x3c/0x8f [smsmdtv] Dec 8 22:31:55 localhost kernel: [24035.987276] [<f9a92613>] ? smscore_find_client+0x3c/0x8f [smsmdtv] Dec 8 22:31:55 localhost kernel: [24035.987281] [<f9a9277d>] ? smscore_validate_client+0x35/0xab [smsmdtv] Dec 8 22:31:55 localhost kernel: [24035.987285] [<f9a9284d>] ? smsclient_sendrequest+0x5a/0x75 [smsmdtv] Dec 8 22:31:55 localhost kernel: [24035.987290] [<f85de1f7>] ? smsdvb_sendrequest_and_wait+0x1f/0x44 [smsdvb] Dec 8 22:31:55 localhost kernel: [24035.987294] [<f85de250>] ? smsdvb_send_statistics_request+0x34/0x36 [smsdvb] Dec 8 22:31:55 localhost kernel: [24035.987298] [<f85de372>] ? smsdvb_read_status+0x17/0x2f [smsdvb] Dec 8 22:31:55 localhost kernel: [24035.987306] [<f9ae4512>] ? dvb_frontend_swzigzag+0x90/0x21c [dvb_core] Dec 8 22:31:55 localhost kernel: [24035.987313] [<f9ae4b48>] ? dvb_frontend_thread+0x4aa/0x5a1 [dvb_core] Dec 8 22:31:55 localhost kernel: [24035.987317] [<c104c73f>] ? autoremove_wake_function+0x0/0x33 Dec 8 22:31:55 localhost kernel: [24035.987324] [<f9ae469e>] ? dvb_frontend_thread+0x0/0x5a1 [dvb_core] Dec 8 22:31:55 localhost kernel: [24035.987327] [<c104c3ca>] ? kthread+0x64/0x69 Dec 8 22:31:55 localhost kernel: [24035.987330] [<c104c366>] ? kthread+0x0/0x69 Dec 8 22:31:55 localhost kernel: [24035.987334] [<c1003686>] ? kernel_thread_helper+0x6/0x1a Dec 8 22:31:55 localhost kernel: [24035.987336] Code: e8 15 ff ff ff c7 43 0c ff ff ff ff 89 d8 c7 43 08 ff ff ff ff e8 c0 a4 e4 ff 90 5b 5b 5e 5d c3 55 89 e5 57 89 c7 56 53 83 ec 14 <81> 78 04 ad 4e ad de 74 0a ba 2a 89 4d c1 e8 dc fe ff ff 64 a1 Dec 8 22:31:55 localhost kernel: [24035.987381] EIP: [<c11d486b>] do_raw_spin_lock+0xb/0x104 SS:ESP 0068:f134be78 Dec 8 22:31:55 localhost kernel: [24035.987386] CR2: 00000000016a2cef Dec 8 22:31:55 localhost kernel: [24035.987389] ---[ end trace 3eecaa602de2f1fa ]--- I would find ways to "make it work" by introducing some ugliness but I have very little idea how the dvb-usb subsystem is supposed to work so I may be missing something obvious? Richard -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html