================================ WARNING: inconsistent lock state 4.14.221-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.0/16621 [HC0[0]:SC0[0]:HE1:SE1] takes: (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] sco_conn_del+0xbf/0x290 net/bluetooth/sco.c:175 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_sock_timeout+0x29/0x1c0 net/bluetooth/sco.c:82 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1106 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 lock_release+0x1a/0x870 kernel/locking/lockdep.c:4007 rcu_lock_release include/linux/rcupdate.h:247 [inline] rcu_read_unlock include/linux/rcupdate.h:685 [inline] is_bpf_text_address+0xb8/0x150 kernel/bpf/core.c:458 kernel_text_address kernel/extable.c:150 [inline] kernel_text_address+0xbd/0xf0 kernel/extable.c:120 __kernel_text_address+0x9/0x30 kernel/extable.c:105 unwind_get_return_address arch/x86/kernel/unwind_orc.c:252 [inline] unwind_get_return_address+0x51/0x90 arch/x86/kernel/unwind_orc.c:247 __save_stack_trace+0xa0/0x160 arch/x86/kernel/stacktrace.c:45 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc_node mm/slab.c:3333 [inline] kmem_cache_alloc_node+0x133/0x410 mm/slab.c:3640 __alloc_skb+0x5c/0x510 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:980 [inline] kobject_uevent_env+0x882/0xf40 lib/kobject_uevent.c:479 kobject_synth_uevent+0x5b6/0x6d0 lib/kobject_uevent.c:205 uevent_store+0x21/0x60 drivers/base/core.c:1020 dev_attr_store+0x56/0x80 drivers/base/core.c:738 sysfs_kf_write+0x106/0x160 fs/sysfs/file.c:141 kernfs_fop_write+0x289/0x440 fs/kernfs/file.c:316 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb irq event stamp: 18649 hardirqs last enabled at (18649): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (18649): [] _raw_spin_unlock_irq+0x24/0x80 kernel/locking/spinlock.c:200 hardirqs last disabled at (18648): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (18648): [] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:168 softirqs last enabled at (18478): [] spin_unlock_bh include/linux/spinlock.h:362 [inline] softirqs last enabled at (18478): [] peernet2id+0x60/0x70 net/core/net_namespace.c:245 softirqs last disabled at (18476): [] spin_lock_bh include/linux/spinlock.h:322 [inline] softirqs last disabled at (18476): [] peernet2id+0x20/0x70 net/core/net_namespace.c:243 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(slock-AF_BLUETOOTH-BTPROTO_SCO); lock(slock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 4 locks held by syz-executor.0/16621: #0: (rfkill_global_mutex){+.+.}, at: [] rfkill_fop_write+0xbf/0x3c0 net/rfkill/core.c:1225 #1: (&hdev->req_lock){+.+.}, at: [] hci_dev_do_close+0x109/0xca0 net/bluetooth/hci_core.c:1576 #2: (&hdev->lock){+.+.}, at: [] hci_dev_do_close+0x21c/0xca0 net/bluetooth/hci_core.c:1607 #3: (hci_cb_list_lock){+.+.}, at: [] hci_disconn_cfm include/net/bluetooth/hci_core.h:1223 [inline] #3: (hci_cb_list_lock){+.+.}, at: [] hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1393 stack backtrace: CPU: 1 PID: 16621 Comm: syz-executor.0 Not tainted 4.14.221-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2589 valid_state kernel/locking/lockdep.c:2602 [inline] mark_lock_irq kernel/locking/lockdep.c:2796 [inline] mark_lock+0xb4d/0x1050 kernel/locking/lockdep.c:3194 mark_irqflags kernel/locking/lockdep.c:3090 [inline] __lock_acquire+0xd5c/0x3f20 kernel/locking/lockdep.c:3448 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_conn_del+0xbf/0x290 net/bluetooth/sco.c:175 sco_disconn_cfm+0x65/0xa0 net/bluetooth/sco.c:1134 hci_disconn_cfm include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1393 hci_dev_do_close+0x535/0xca0 net/bluetooth/hci_core.c:1620 hci_rfkill_set_block+0xaf/0x120 net/bluetooth/hci_core.c:2050 rfkill_set_block+0x1b2/0x4a0 net/rfkill/core.c:337 rfkill_fop_write+0x1b6/0x3c0 net/rfkill/core.c:1233 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x466019 RSP: 002b:00007f640260f188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466019 RDX: 00000000fffffeed RSI: 0000000020000080 RDI: 0000000000000004 RBP: 00000000004bd067 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffdc99edfdf R14: 00007f640260f300 R15: 0000000000022000 kauditd_printk_skb: 3 callbacks suppressed audit: type=1804 audit(1613864500.349:6130): pid=16750 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir736835471/syzkaller.XOq6sD/171/bus" dev="sda1" ino=16519 res=1 ip6_tables: ip6tables: counters copy to user failed while replacing table ip6_tables: ip6tables: counters copy to user failed while replacing table binder_alloc: binder_alloc_mmap_handler: 16819 20ffa000-20ffc000 already mapped failed -16 XFS (loop3): unknown mount option [biosize=00000000000000004095]. binder_alloc: binder_alloc_mmap_handler: 16819 20ffa000-20ffc000 already mapped failed -16 audit: type=1804 audit(1613864501.389:6131): pid=16872 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir164823458/syzkaller.Q56uhJ/232/bus" dev="sda1" ino=16535 res=1 audit: type=1804 audit(1613864501.419:6132): pid=16872 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir164823458/syzkaller.Q56uhJ/232/bus" dev="sda1" ino=16535 res=1 audit: type=1804 audit(1613864501.439:6133): pid=16873 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir449968124/syzkaller.Jz0mAu/189/bus" dev="sda1" ino=16521 res=1 audit: type=1804 audit(1613864501.459:6134): pid=16889 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir449968124/syzkaller.Jz0mAu/189/bus" dev="sda1" ino=16521 res=1 audit: type=1804 audit(1613864501.479:6135): pid=16893 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir164823458/syzkaller.Q56uhJ/232/bus" dev="sda1" ino=16535 res=1 audit: type=1804 audit(1613864502.199:6136): pid=16925 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir164823458/syzkaller.Q56uhJ/232/bus" dev="sda1" ino=16535 res=1 audit: type=1804 audit(1613864502.209:6137): pid=16925 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir164823458/syzkaller.Q56uhJ/232/bus" dev="sda1" ino=16535 res=1 audit: type=1804 audit(1613864502.279:6138): pid=16925 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir164823458/syzkaller.Q56uhJ/232/bus" dev="sda1" ino=16535 res=1 IPVS: ftp: loaded support on port[0] = 21 audit: type=1804 audit(1613864503.489:6139): pid=17066 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir736835471/syzkaller.XOq6sD/176/bus" dev="sda1" ino=16575 res=1 f2fs_msg: 10 callbacks suppressed F2FS-fs (loop3): Wrong secs_per_zone / total_sections (201326593, 24) F2FS-fs (loop3): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop3): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop3): Can't find valid F2FS filesystem in 2th superblock F2FS-fs (loop3): Wrong secs_per_zone / total_sections (201326593, 24) F2FS-fs (loop3): Can't find valid F2FS filesystem in 1th superblock F2FS-fs (loop3): Magic Mismatch, valid(0xf2f52010) - read(0x0) F2FS-fs (loop3): Can't find valid F2FS filesystem in 2th superblock F2FS-fs (loop3): Wrong secs_per_zone / total_sections (201326593, 24) F2FS-fs (loop3): Can't find valid F2FS filesystem in 1th superblock IPVS: set_ctl: invalid protocol: 0 172.20.20.170:0 IPVS: set_ctl: invalid protocol: 0 172.20.20.170:0 kauditd_printk_skb: 3 callbacks suppressed audit: type=1804 audit(1613864507.369:6143): pid=17401 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir736835471/syzkaller.XOq6sD/182/bus" dev="sda1" ino=16636 res=1 audit: type=1804 audit(1613864507.439:6144): pid=17410 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir736835471/syzkaller.XOq6sD/182/bus" dev="sda1" ino=16636 res=1 audit: type=1804 audit(1613864507.629:6145): pid=17431 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir736835471/syzkaller.XOq6sD/183/bus" dev="sda1" ino=16624 res=1 audit: type=1326 audit(1613864508.239:6146): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=17471 comm="syz-executor.3" exe="/root/syz-executor.3" sig=31 arch=c000003e syscall=202 compat=0 ip=0x466019 code=0x0 audit: type=1804 audit(1613864508.359:6147): pid=17484 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.2" name="/root/syzkaller-testdir736835471/syzkaller.XOq6sD/183/bus" dev="sda1" ino=16624 res=1 audit: type=1804 audit(1613864508.389:6148): pid=17485 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir736835471/syzkaller.XOq6sD/183/bus" dev="sda1" ino=16624 res=1