Created attachment 76761 [details] dmesg showing results from quickly power-cycling mouse If I quickly power-cycle my Bluetooth mouse, the following in dmesg: [ 6967.313318] ------------[ cut here ]------------ [ 6967.313337] WARNING: at fs/sysfs/dir.c:529 sysfs_add_one+0xca/0x100() [ 6967.313341] Hardware name: A15A/HE/HC [ 6967.313344] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:21' [ 6967.313381] Modules linked in: ppp_deflate zlib_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc hidp option usb_wwan be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i ebtable_nat cxgb4 ebtables cxgb3i cxgb3 ipt_MASQUERADE mdio libcxgbi iptable_nat nf_nat lockd ib_iser rdma_cm rfcomm ib_addr iw_cm xt_CHECKSUM sunrpc iptable_mangle ib_cm ib_sa ib_mad bridge ib_core stp bnep llc iscsi_tcp libiscsi_tcp libiscsi tpm_bios nf_conntrack_ipv4 scsi_transport_iscsi ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv4 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables fuse arc4 ath3k ath9k ath9k_common ath9k_hw snd_hda_codec_hdmi btusb snd_hda_codec_conexant ath usb_storage bluetooth mac80211 uvcvideo snd_hda_intel snd_hda_codec videobuf2_vmalloc videobuf2_memops videobuf2_core videodev snd_hwdep snd_pcm snd_page_alloc snd_timer media snd cfg80211 rfkill soundcore serio_raw i2c_i801 mei atl1c lpc_ich mfd_core coretemp microcode vhost_net tun macvtap macvlan kvm_intel kvm binfmt_misc uinput crc32c_intel ghash_clmulni_intel wmi i915 video i2c_algo_bit drm_kms_helper drm i2c_core [last unloaded: scsi_wait_scan] [ 6967.313576] Pid: 13547, comm: kworker/u:1 Not tainted 3.5.0-2.fc17.x86_64 #1 [ 6967.313579] Call Trace: [ 6967.313595] [<ffffffff8105815f>] warn_slowpath_common+0x7f/0xc0 [ 6967.313604] [<ffffffff81058256>] warn_slowpath_fmt+0x46/0x50 [ 6967.313612] [<ffffffff811f5bba>] sysfs_add_one+0xca/0x100 [ 6967.313618] [<ffffffff811f5de8>] create_dir+0x78/0xd0 [ 6967.313625] [<ffffffff811f6176>] sysfs_create_dir+0x86/0xe0 [ 6967.313633] [<ffffffff812cc888>] kobject_add_internal+0x98/0x260 [ 6967.313642] [<ffffffff812d5ac1>] ? vsnprintf+0x461/0x600 [ 6967.313652] [<ffffffff81092b50>] ? enqueue_entity+0xc0/0x440 [ 6967.313658] [<ffffffff812ccdb7>] kobject_add+0x67/0xc0 [ 6967.313668] [<ffffffff813add39>] device_add+0x119/0x6e0 [ 6967.313675] [<ffffffff813ac511>] ? dev_set_name+0x41/0x50 [ 6967.313709] [<ffffffffa03bc984>] hci_conn_add_sysfs+0x54/0xc0 [bluetooth] [ 6967.313734] [<ffffffffa03ae890>] hci_conn_complete_evt.isra.46+0xe0/0x380 [bluetooth] [ 6967.313757] [<ffffffffa03b1418>] hci_event_packet+0xee8/0x2680 [bluetooth] [ 6967.313767] [<ffffffff81170e40>] ? kmem_cache_free+0x20/0x100 [ 6967.313791] [<ffffffffa03bb89f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth] [ 6967.313799] [<ffffffff814ec647>] ? __kfree_skb+0x47/0xa0 [ 6967.313806] [<ffffffff814ec6d6>] ? kfree_skb+0x36/0xa0 [ 6967.313828] [<ffffffffa03bb89f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth] [ 6967.313849] [<ffffffffa03a3b48>] hci_rx_work+0x1e8/0x430 [bluetooth] [ 6967.313857] [<ffffffff810740a9>] process_one_work+0x129/0x400 [ 6967.313877] [<ffffffffa03a3960>] ? hci_send_frame+0xc0/0xc0 [bluetooth] [ 6967.313884] [<ffffffff81075be6>] worker_thread+0x126/0x2e0 [ 6967.313890] [<ffffffff81075ac0>] ? manage_workers.isra.25+0x1f0/0x1f0 [ 6967.313898] [<ffffffff8107b163>] kthread+0x93/0xa0 [ 6967.313908] [<ffffffff81610f24>] kernel_thread_helper+0x4/0x10 [ 6967.313916] [<ffffffff8107b0d0>] ? flush_kthread_worker+0x80/0x80 [ 6967.313924] [<ffffffff81610f20>] ? gs_change+0x13/0x13 [ 6967.313928] ---[ end trace 5cab3804149839fc ]--- Complete dmesg is attached. There were 2 more warnings. Obviously, the mouse no longer works until reboot and a subsequent attempt to reconnect to it resulted in an OOPS on a null-pointer dereference. This seems to be related to the mechanism for reporting the mouse's battery state. For a while I was using a 3.4 series kernel with this disabled and had no trouble. As soon as this was re-enabled, I get this consistently-reproducible bug again.
This seems to be caused by CONFIG_HID_BATTERY_STRENGTH -- disable it, and I can no longer provoke this bug.
Still saw it in 3.6.3.
(In reply to comment #2) > Still saw it in 3.6.3. This should be fixed by 3df92b31b2b, which is present in 3.5. Could you verify if this commit is present?
Still present and reproducible in 3.6.6. I don't know where to find 3df92b31b2b, can anyone provide a direct link? [96255.496186] ------------[ cut here ]------------ [96255.496201] WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0xd4/0x100() [96255.496205] Hardware name: A15A/HE/HC [96255.496231] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:1a.0/usb2/2-1/2-1.2/2-1.2:1.0/bluetooth/hci0/hci0:21' [96255.496234] Modules linked in: hidp nf_nat_h323 nf_conntrack_h323 nf_nat_pptp nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_tftp nf_conntrack_tftp nf_nat_sip nf_conntrack_sip nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp btrfs libcrc32c hfsplus hfs minix msdos jfs xfs reiserfs vfat fat ppp_deflate zlib_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc option usb_wwan usb_storage ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat xt_CHECKSUM iptable_mangle bridge lockd sunrpc stp llc rfcomm ip6t_REJECT nf_conntrack_ipv4 nf_conntrack_ipv6 nf_defrag_ipv4 nf_defrag_ipv6 bnep ip6table_filter xt_state nf_conntrack ip6_tables fuse snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec ath3k snd_hwdep snd_seq btusb snd_seq_device uvcvideo snd_pcm videobuf2_vmalloc arc4 bluetooth videobuf2_memops ath9k videobuf2_core videodev media mei ath9k_common ath9k_hw snd_page_alloc ath mac80211 snd_timer cfg80211 coretemp iTCO_wdt iTCO_vendor_support lpc_ich mfd_core snd i2c_i801 serio_raw atl1c rfkill soundcore microcode vhost_net tun macvtap macvlan kvm_intel kvm binfmt_misc uinput crc32c_intel ghash_clmulni_intel wmi i915 video i2c_algo_bit drm_kms_helper drm i2c_core [96255.496426] Pid: 7, comm: kworker/u:0H Not tainted 3.6.6-1.fc17.x86_64 #1 [96255.496429] Call Trace: [96255.496442] [<ffffffff8105b8ef>] warn_slowpath_common+0x7f/0xc0 [96255.496449] [<ffffffff8105b9e6>] warn_slowpath_fmt+0x46/0x50 [96255.496459] [<ffffffff812e1365>] ? strlcat+0x65/0x90 [96255.496465] [<ffffffff81200b54>] sysfs_add_one+0xd4/0x100 [96255.496471] [<ffffffff81200d78>] create_dir+0x78/0xd0 [96255.496477] [<ffffffff812010c6>] sysfs_create_dir+0x86/0xe0 [96255.496484] [<ffffffff812daf18>] kobject_add_internal+0x98/0x260 [96255.496491] [<ffffffff812e3bf1>] ? vsnprintf+0x461/0x600 [96255.496501] [<ffffffff81096c90>] ? enqueue_entity+0xc0/0x440 [96255.496507] [<ffffffff812db447>] kobject_add+0x67/0xc0 [96255.496516] [<ffffffff813beec9>] device_add+0x119/0x6e0 [96255.496523] [<ffffffff813bd681>] ? dev_set_name+0x41/0x50 [96255.496557] [<ffffffffa03dab04>] hci_conn_add_sysfs+0x54/0xc0 [bluetooth] [96255.496584] [<ffffffffa03cc820>] hci_conn_complete_evt.isra.46+0xe0/0x400 [bluetooth] [96255.496608] [<ffffffffa03cfb08>] hci_event_packet+0x1478/0x2620 [bluetooth] [96255.496634] [<ffffffffa03d9a1f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth] [96255.496644] [<ffffffff81502517>] ? __kfree_skb+0x47/0xa0 [96255.496651] [<ffffffff815025a6>] ? kfree_skb+0x36/0xa0 [96255.496675] [<ffffffffa03d9a1f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth] [96255.496697] [<ffffffffa03c1fa8>] hci_rx_work+0x1e8/0x430 [bluetooth] [96255.496705] [<ffffffff8101257b>] ? __switch_to+0x12b/0x420 [96255.496714] [<ffffffff81077cb7>] process_one_work+0x147/0x4a0 [96255.496735] [<ffffffffa03c1dc0>] ? hci_send_frame+0xc0/0xc0 [bluetooth] [96255.496743] [<ffffffff81079a1e>] worker_thread+0x15e/0x480 [96255.496751] [<ffffffff810798c0>] ? manage_workers+0x2f0/0x2f0 [96255.496758] [<ffffffff8107ede3>] kthread+0x93/0xa0 [96255.496767] [<ffffffff816269c4>] kernel_thread_helper+0x4/0x10 [96255.496774] [<ffffffff8107ed50>] ? kthread_freezable_should_stop+0x70/0x70 [96255.496780] [<ffffffff816269c0>] ? gs_change+0x13/0x13 [96255.496784] ---[ end trace e7e89815c8aa1811 ]--- [96255.496790] ------------[ cut here ]------------ [96255.496795] WARNING: at lib/kobject.c:196 kobject_add_internal+0x1f4/0x260() [96255.496798] Hardware name: A15A/HE/HC [96255.496802] kobject_add_internal failed for hci0:21 with -EEXIST, don't try to register things with the same name in the same directory. [96255.496804] Modules linked in: hidp nf_nat_h323 nf_conntrack_h323 nf_nat_pptp nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_tftp nf_conntrack_tftp nf_nat_sip nf_conntrack_sip nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp btrfs libcrc32c hfsplus hfs minix msdos jfs xfs reiserfs vfat fat ppp_deflate zlib_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc option usb_wwan usb_storage ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat xt_CHECKSUM iptable_mangle bridge lockd sunrpc stp llc rfcomm ip6t_REJECT nf_conntrack_ipv4 nf_conntrack_ipv6 nf_defrag_ipv4 nf_defrag_ipv6 bnep ip6table_filter xt_state nf_conntrack ip6_tables fuse snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec ath3k snd_hwdep snd_seq btusb snd_seq_device uvcvideo snd_pcm videobuf2_vmalloc arc4 bluetooth videobuf2_memops ath9k videobuf2_core videodev media mei ath9k_common ath9k_hw snd_page_alloc ath mac80211 snd_timer cfg80211 coretemp iTCO_wdt iTCO_vendor_support lpc_ich mfd_core snd i2c_i801 serio_raw atl1c rfkill soundcore microcode vhost_net tun macvtap macvlan kvm_intel kvm binfmt_misc uinput crc32c_intel ghash_clmulni_intel wmi i915 video i2c_algo_bit drm_kms_helper drm i2c_core [96255.496945] Pid: 7, comm: kworker/u:0H Tainted: G W 3.6.6-1.fc17.x86_64 #1 [96255.496948] Call Trace: [96255.496954] [<ffffffff8105b8ef>] warn_slowpath_common+0x7f/0xc0 [96255.496961] [<ffffffff8105b9e6>] warn_slowpath_fmt+0x46/0x50 [96255.496967] [<ffffffff812db074>] kobject_add_internal+0x1f4/0x260 [96255.496975] [<ffffffff812e3bf1>] ? vsnprintf+0x461/0x600 [96255.496981] [<ffffffff81096c90>] ? enqueue_entity+0xc0/0x440 [96255.496987] [<ffffffff812db447>] kobject_add+0x67/0xc0 [96255.496994] [<ffffffff813beec9>] device_add+0x119/0x6e0 [96255.497000] [<ffffffff813bd681>] ? dev_set_name+0x41/0x50 [96255.497025] [<ffffffffa03dab04>] hci_conn_add_sysfs+0x54/0xc0 [bluetooth] [96255.497048] [<ffffffffa03cc820>] hci_conn_complete_evt.isra.46+0xe0/0x400 [bluetooth] [96255.497071] [<ffffffffa03cfb08>] hci_event_packet+0x1478/0x2620 [bluetooth] [96255.497094] [<ffffffffa03d9a1f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth] [96255.497102] [<ffffffff81502517>] ? __kfree_skb+0x47/0xa0 [96255.497109] [<ffffffff815025a6>] ? kfree_skb+0x36/0xa0 [96255.497131] [<ffffffffa03d9a1f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth] [96255.497153] [<ffffffffa03c1fa8>] hci_rx_work+0x1e8/0x430 [bluetooth] [96255.497160] [<ffffffff8101257b>] ? __switch_to+0x12b/0x420 [96255.497168] [<ffffffff81077cb7>] process_one_work+0x147/0x4a0 [96255.497189] [<ffffffffa03c1dc0>] ? hci_send_frame+0xc0/0xc0 [bluetooth] [96255.497197] [<ffffffff81079a1e>] worker_thread+0x15e/0x480 [96255.497205] [<ffffffff810798c0>] ? manage_workers+0x2f0/0x2f0 [96255.497224] [<ffffffff8107ede3>] kthread+0x93/0xa0 [96255.497232] [<ffffffff816269c4>] kernel_thread_helper+0x4/0x10 [96255.497239] [<ffffffff8107ed50>] ? kthread_freezable_should_stop+0x70/0x70 [96255.497261] [<ffffffff816269c0>] ? gs_change+0x13/0x13 [96255.497274] ---[ end trace e7e89815c8aa1812 ]--- [96255.497286] Bluetooth: Failed to register connection device
Would you mind testing this to see if this happens on recent kernels? Nick
I no longer have a Bluetooth mouse. Closing for now.