https://bugzilla.kernel.org/show_bug.cgi?id=199669 Bug ID: 199669 Summary: WARNING: possible recursive locking, bt_accept_enqueue l2cap_sock_new_connection_cb Product: Drivers Version: 2.5 Kernel Version: 4.17.0-0.rc4.git1.1.fc29.x86_64 Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Bluetooth Assignee: linux-bluetooth@xxxxxxxxxxxxxxx Reporter: bugzilla@xxxxxxxxxxxxxxxxx Regression: No Shortly after startup, I get a recursive lock warning in Fedora debug kernels. This is in the journal just before the warning and call trace: [ 38.069308] f28h.local bluetoothd[737]: src/adapter.c:connected_callback() hci0 device 58:1F:AA:EB:B4:6A connected eir_len 13 And then the warning: [ 38.452951] ============================================ [ 38.452953] WARNING: possible recursive locking detected [ 38.452957] 4.17.0-0.rc4.git1.1.fc29.x86_64 #1 Not tainted [ 38.452959] -------------------------------------------- [ 38.452962] kworker/u9:3/679 is trying to acquire lock: [ 38.452964] 00000000bc5df450 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}, at: bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 38.452988] but task is already holding lock: [ 38.452991] 000000008b816fd8 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}, at: l2cap_sock_new_connection_cb+0x18/0xa0 [bluetooth] [ 38.453015] other info that might help us debug this: [ 38.453018] Possible unsafe locking scenario: [ 38.453021] CPU0 [ 38.453023] ---- [ 38.453024] lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP); [ 38.453028] lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP); [ 38.453031] *** DEADLOCK *** [ 38.453034] May be due to missing lock nesting notation [ 38.453038] 5 locks held by kworker/u9:3/679: [ 38.453040] #0: 00000000cb657509 ((wq_completion)"%s"hdev->name#2){+.+.}, at: process_one_work+0x1d7/0x630 [ 38.453051] #1: 00000000c5923079 ((work_completion)(&hdev->rx_work)){+.+.}, at: process_one_work+0x1d7/0x630 [ 38.453058] #2: 00000000764e3538 (&conn->chan_lock){+.+.}, at: l2cap_connect+0x8f/0x5a0 [bluetooth] [ 38.453084] #3: 000000001231acea (&chan->lock/2){+.+.}, at: l2cap_connect+0xa9/0x5a0 [bluetooth] [ 38.453110] #4: 000000008b816fd8 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}, at: l2cap_sock_new_connection_cb+0x18/0xa0 [bluetooth] [ 38.453134] stack backtrace: [ 38.453140] CPU: 2 PID: 679 Comm: kworker/u9:3 Not tainted 4.17.0-0.rc4.git1.1.fc29.x86_64 #1 [ 38.453143] Hardware name: HP HP Spectre Notebook/81A0, BIOS F.40 02/26/2018 [ 38.453166] Workqueue: hci0 hci_rx_work [bluetooth] [ 38.453170] Call Trace: [ 38.453178] dump_stack+0x85/0xc0 [ 38.453183] __lock_acquire.cold.64+0x158/0x227 [ 38.453189] ? mark_held_locks+0x57/0x80 [ 38.453195] ? lock_acquire+0x9e/0x1b0 [ 38.453213] ? bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 38.453218] ? lock_sock_nested+0x72/0xa0 [ 38.453235] ? bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 38.453253] ? bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 38.453275] ? l2cap_sock_new_connection_cb+0x5d/0xa0 [bluetooth] [ 38.453298] ? l2cap_connect+0x110/0x5a0 [bluetooth] [ 38.453320] ? l2cap_recv_frame+0x6d0/0x2cb0 [bluetooth] [ 38.453326] ? __mutex_unlock_slowpath+0x4b/0x2b0 [ 38.453349] ? l2cap_recv_frame+0x6e8/0x2cb0 [bluetooth] [ 38.453354] ? __mutex_unlock_slowpath+0x4b/0x2b0 [ 38.453372] ? hci_rx_work+0x1c6/0x5d0 [bluetooth] [ 38.453378] ? process_one_work+0x261/0x630 [ 38.453385] ? worker_thread+0x3a/0x390 [ 38.453390] ? process_one_work+0x630/0x630 [ 38.453394] ? kthread+0x120/0x140 [ 38.453398] ? kthread_create_worker_on_cpu+0x70/0x70 [ 38.453403] ? ret_from_fork+0x3a/0x50 [chris@f28h ~]$ sudo hciconfig -a hci0: Type: Primary Bus: USB BD Address: 00:C2:C6:F0:52:57 ACL MTU: 1021:4 SCO MTU: 96:6 UP RUNNING PSCAN ISCAN RX bytes:400385 acl:19244 sco:0 events:154 errors:0 TX bytes:4497 acl:28 sco:0 commands:103 errors:0 Features: 0xbf 0xfe 0x0f 0xfe 0xdb 0xff 0x7b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH SNIFF Link mode: SLAVE ACCEPT Name: 'f28h.local' Class: 0x4c010c Service Classes: Rendering, Capturing, Telephony Device Class: Computer, Laptop HCI Version: 4.2 (0x8) Revision: 0x100 LMP Version: 4.2 (0x8) Subversion: 0x100 Manufacturer: Intel Corp. (2) Possible downstream bug shows this happening with kernel 4.6.1 https://bugzilla.redhat.com/show_bug.cgi?id=1566104 -- You are receiving this mail because: You are the assignee for the bug.-- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html