================================ WARNING: inconsistent lock state 4.19.166-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.0/21081 [HC0[0]:SC1[1]:HE1:SE0] takes: 00000000c7bc8390 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 00000000c7bc8390 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: sco_sock_timeout+0x31/0x210 net/bluetooth/sco.c:82 {SOFTIRQ-ON-W} state was registered at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_conn_del+0xe2/0x240 net/bluetooth/sco.c:175 sco_disconn_cfm+0x74/0xb0 net/bluetooth/sco.c:1133 hci_disconn_cfm include/net/bluetooth/hci_core.h:1261 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512 hci_dev_do_close+0x659/0xf10 net/bluetooth/hci_core.c:1666 hci_unregister_dev+0x18b/0x910 net/bluetooth/hci_core.c:3271 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xbed/0x2be0 kernel/exit.c:890 do_group_exit+0x125/0x310 kernel/exit.c:993 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 7076 hardirqs last enabled at (7076): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (7076): [] _raw_spin_unlock_irq+0x24/0x80 kernel/locking/spinlock.c:192 hardirqs last disabled at (7075): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (7075): [] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160 softirqs last enabled at (4172): [] __do_softirq+0x69a/0x9a0 kernel/softirq.c:318 softirqs last disabled at (7029): [] invoke_softirq kernel/softirq.c:372 [inline] softirqs last disabled at (7029): [] irq_exit+0x215/0x260 kernel/softirq.c:412 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 *** 2 locks held by syz-executor.0/21081: #0: 0000000040465de6 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: spin_lock include/linux/spinlock.h:329 [inline] #0: 0000000040465de6 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: zap_pte_range mm/memory.c:1311 [inline] #0: 0000000040465de6 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: zap_pmd_range mm/memory.c:1452 [inline] #0: 0000000040465de6 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: zap_pud_range mm/memory.c:1481 [inline] #0: 0000000040465de6 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: zap_p4d_range mm/memory.c:1502 [inline] #0: 0000000040465de6 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: unmap_page_range+0xa1c/0x2a70 mm/memory.c:1523 #1: 000000009c1d7f95 ((&sk->sk_timer)#3){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #1: 000000009c1d7f95 ((&sk->sk_timer)#3){+.-.}, at: call_timer_fn+0xc9/0x700 kernel/time/timer.c:1328 stack backtrace: CPU: 0 PID: 21081 Comm: syz-executor.0 Not tainted 4.19.166-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2544 valid_state kernel/locking/lockdep.c:2557 [inline] mark_lock_irq kernel/locking/lockdep.c:2751 [inline] mark_lock+0xc70/0x1160 kernel/locking/lockdep.c:3131 mark_irqflags kernel/locking/lockdep.c:3009 [inline] __lock_acquire+0xdc4/0x3ff0 kernel/locking/lockdep.c:3372 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_sock_timeout+0x31/0x210 net/bluetooth/sco.c:82 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x26c/0x9a0 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:545 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:get_current arch/x86/include/asm/current.h:15 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x4/0x50 kernel/kcov.c:100 Code: 00 6e 88 4c 89 25 cc 58 bf 0b 41 bc f4 ff ff ff e8 00 fa ea ff 48 c7 05 b6 58 bf 0b 00 00 00 00 e9 39 ec ff ff 90 48 8b 34 24 <65> 48 8b 04 25 80 df 01 00 65 8b 15 ec 0d 9d 7e 81 e2 00 01 1f 00 RSP: 0018:ffff88804558f6b8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 0000000000055b84 RCX: ffffffff818e1219 RDX: 0000000000000000 RSI: ffffffff818e1226 RDI: 0000000000000005 RBP: 1ffff11008ab1eda R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000000 R12: 8000000055b84007 R13: ffff8880afe5ea90 R14: 00007fa10e037000 R15: ffff88804558f6f0 _vm_normal_page+0x1c6/0x510 mm/memory.c:896 zap_pte_range mm/memory.c:1323 [inline] zap_pmd_range mm/memory.c:1452 [inline] zap_pud_range mm/memory.c:1481 [inline] zap_p4d_range mm/memory.c:1502 [inline] unmap_page_range+0xfba/0x2a70 mm/memory.c:1523 unmap_single_vma+0x198/0x300 mm/memory.c:1568 unmap_vmas+0xa9/0x180 mm/memory.c:1598 exit_mmap+0x2b9/0x530 mm/mmap.c:3093 __mmput kernel/fork.c:1015 [inline] mmput+0x14e/0x4a0 kernel/fork.c:1036 exit_mm kernel/exit.c:549 [inline] do_exit+0xaf0/0x2be0 kernel/exit.c:877 do_group_exit+0x125/0x310 kernel/exit.c:993 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45e219 Code: Bad RIP value. RSP: 002b:00007fa10bb58cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000119bf88 RCX: 000000000045e219 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000119bf88 RBP: 000000000119bf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffe787bb6bf R14: 00007fa10bb599c0 R15: 000000000119bf8c EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue netlink: 8 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.4'. EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue device syzkaller1 entered promiscuous mode netlink: 'syz-executor.5': attribute type 10 has an invalid length. team0: Device macvtap0 is up. Set it down before adding it as a team port device syzkaller1 entered promiscuous mode device syzkaller1 entered promiscuous mode netlink: 'syz-executor.1': attribute type 10 has an invalid length. IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready team0: Device macvtap0 failed to register rx_handler device syzkaller1 entered promiscuous mode netlink: 'syz-executor.1': attribute type 10 has an invalid length. IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready team0: Device macvtap0 failed to register rx_handler netlink: 'syz-executor.4': attribute type 1 has an invalid length. netlink: 'syz-executor.4': attribute type 1 has an invalid length. kauditd_printk_skb: 4 callbacks suppressed audit: type=1326 audit(1610413742.594:10734): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21900 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=228 compat=0 ip=0x46107a code=0x7ffc0000 bridge0: port 2(bridge_slave_1) entered disabled state bridge0: port 1(bridge_slave_0) entered disabled state device bridge0 entered promiscuous mode audit: type=1326 audit(1610413742.604:10735): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21900 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x45e219 code=0x7ffc0000 audit: type=1326 audit(1610413742.604:10736): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21900 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x45e219 code=0x7ffc0000 audit: type=1326 audit(1610413742.644:10737): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21900 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=228 compat=0 ip=0x46107a code=0x7ffc0000 audit: type=1326 audit(1610413742.644:10738): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21900 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=157 compat=0 ip=0x45e219 code=0x7ffc0000 device syzkaller1 entered promiscuous mode netlink: 5 bytes leftover after parsing attributes in process `syz-executor.3'. audit: type=1326 audit(1610413742.644:10739): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21900 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=228 compat=0 ip=0x46107a code=0x7ffc0000 audit: type=1326 audit(1610413742.644:10740): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21900 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x45e219 code=0x7ffc0000 bridge0: port 2(bridge_slave_1) entered blocking state audit: type=1326 audit(1610413742.644:10741): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21900 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x45e219 code=0x7ffc0000 bridge0: port 2(bridge_slave_1) entered forwarding state bridge0: port 1(bridge_slave_0) entered blocking state bridge0: port 1(bridge_slave_0) entered forwarding state IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready bridge0: port 2(bridge_slave_1) entered disabled state bridge0: port 1(bridge_slave_0) entered disabled state netlink: 8 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 'syz-executor.1': attribute type 10 has an invalid length. IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready team0: Device macvtap0 failed to register rx_handler audit: type=1326 audit(1610413743.224:10742): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21969 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=228 compat=0 ip=0x46107a code=0x7ffc0000 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.4'. audit: type=1326 audit(1610413743.254:10743): auid=0 uid=0 gid=0 ses=4 subj==unconfined pid=21969 comm="syz-executor.5" exe="/root/syz-executor.5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x45e219 code=0x7ffc0000 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor.3'. bridge0: port 2(bridge_slave_1) entered blocking state bridge0: port 2(bridge_slave_1) entered forwarding state bridge0: port 1(bridge_slave_0) entered blocking state bridge0: port 1(bridge_slave_0) entered forwarding state IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready netlink: 'syz-executor.1': attribute type 10 has an invalid length. IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready team0: Device macvtap0 failed to register rx_handler bridge0: port 2(bridge_slave_1) entered disabled state bridge0: port 1(bridge_slave_0) entered disabled state netlink: 8 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.0'. device bridge0 entered promiscuous mode netlink: 5 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.0'. IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready