BTRFS info (device loop5): enabling ssd optimizations BTRFS info (device loop5): using spread ssd allocation scheme BTRFS info (device loop5): using free space tree BTRFS info (device loop5): has skinny extents ====================================================== WARNING: possible circular locking dependency detected 4.14.307-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/12281 is trying to acquire lock: ("%s-%s""btrfs", name){+.+.}, at: [] flush_workqueue+0xcb/0x1310 kernel/workqueue.c:2622 but task is already holding lock: (&fs_info->scrub_lock){+.+.}, at: [] btrfs_scrub_dev+0x506/0xcd0 fs/btrfs/scrub.c:4217 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&fs_info->scrub_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 btrfs_scrub_dev+0x1f3/0xcd0 fs/btrfs/scrub.c:4150 btrfs_ioctl_scrub fs/btrfs/ioctl.c:4451 [inline] btrfs_ioctl+0xba8/0x5b20 fs/btrfs/ioctl.c:5681 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #2 (&fs_devs->device_list_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 __reada_start_machine fs/btrfs/reada.c:765 [inline] reada_start_machine_worker+0x1d2/0xa90 fs/btrfs/reada.c:746 normal_work_helper+0x304/0x1330 fs/btrfs/async-thread.c:376 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 -> #1 ((&work->normal_work)){+.+.}: process_one_work+0x736/0x14a0 kernel/workqueue.c:2093 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 -> #0 ("%s-%s""btrfs", name){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 __btrfs_destroy_workqueue fs/btrfs/async-thread.c:436 [inline] btrfs_destroy_workqueue+0xf8/0x630 fs/btrfs/async-thread.c:447 scrub_workers_put+0x90/0x1a0 fs/btrfs/scrub.c:4075 btrfs_scrub_dev+0x536/0xcd0 fs/btrfs/scrub.c:4219 btrfs_ioctl_scrub fs/btrfs/ioctl.c:4451 [inline] btrfs_ioctl+0xba8/0x5b20 fs/btrfs/ioctl.c:5681 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 other info that might help us debug this: Chain exists of: "%s-%s""btrfs", name --> &fs_devs->device_list_mutex --> &fs_info->scrub_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fs_info->scrub_lock); lock(&fs_devs->device_list_mutex); lock(&fs_info->scrub_lock); lock("%s-%s""btrfs", name); *** DEADLOCK *** 1 lock held by syz-executor.5/12281: #0: (&fs_info->scrub_lock){+.+.}, at: [] btrfs_scrub_dev+0x506/0xcd0 fs/btrfs/scrub.c:4217 stack backtrace: CPU: 1 PID: 12281 Comm: syz-executor.5 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 __btrfs_destroy_workqueue fs/btrfs/async-thread.c:436 [inline] btrfs_destroy_workqueue+0xf8/0x630 fs/btrfs/async-thread.c:447 scrub_workers_put+0x90/0x1a0 fs/btrfs/scrub.c:4075 btrfs_scrub_dev+0x536/0xcd0 fs/btrfs/scrub.c:4219 btrfs_ioctl_scrub fs/btrfs/ioctl.c:4451 [inline] btrfs_ioctl+0xba8/0x5b20 fs/btrfs/ioctl.c:5681 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f5673a630f9 RSP: 002b:00007f5671fd5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5673b82f80 RCX: 00007f5673a630f9 RDX: 0000000020000100 RSI: 00000000c400941b RDI: 0000000000000004 RBP: 00007f5673abeae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffce465e3ff R14: 00007f5671fd5300 R15: 0000000000022000 ntfs: volume version 3.1. ntfs: volume version 3.1. BTRFS info (device loop5): enabling inode map caching BTRFS info (device loop5): trying to use backup root at mount time BTRFS info (device loop5): use zlib compression BTRFS info (device loop5): enabling ssd optimizations BTRFS info (device loop5): using spread ssd allocation scheme BTRFS info (device loop5): using free space tree BTRFS info (device loop5): has skinny extents ntfs: volume version 3.1. BTRFS info (device loop5): enabling inode map caching BTRFS info (device loop5): trying to use backup root at mount time BTRFS info (device loop5): use zlib compression BTRFS info (device loop5): enabling ssd optimizations BTRFS info (device loop5): using spread ssd allocation scheme BTRFS info (device loop5): using free space tree BTRFS info (device loop5): has skinny extents ntfs: volume version 3.1. BTRFS info (device loop5): enabling inode map caching BTRFS info (device loop5): trying to use backup root at mount time BTRFS info (device loop5): use zlib compression BTRFS info (device loop5): enabling ssd optimizations BTRFS info (device loop5): using spread ssd allocation scheme BTRFS info (device loop5): using free space tree BTRFS info (device loop5): has skinny extents cannot load conntrack support for proto=2 IPVS: ftp: loaded support on port[0] = 21 cannot load conntrack support for proto=2 8021q: adding VLAN 0 to HW filter on device batadv1 bond1: Enslaving batadv1 as a backup interface with an up link bridge0: port 3(bond1) entered blocking state bridge0: port 3(bond1) entered disabled state device bond1 entered promiscuous mode device batadv1 entered promiscuous mode BTRFS info (device loop4): enabling inode map caching BTRFS info (device loop4): trying to use backup root at mount time BTRFS info (device loop4): use zlib compression BTRFS info (device loop4): enabling ssd optimizations BTRFS info (device loop4): using spread ssd allocation scheme BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents cannot load conntrack support for proto=2 8021q: adding VLAN 0 to HW filter on device batadv2 bond2: Enslaving batadv2 as a backup interface with an up link batman_adv: batadv1: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv1: No MLD Querier present - multicast optimizations disabled cannot load conntrack support for proto=2 bridge0: port 4(bond2) entered blocking state bridge0: port 4(bond2) entered disabled state device bond2 entered promiscuous mode device batadv2 entered promiscuous mode BTRFS info (device loop4): enabling inode map caching BTRFS info (device loop4): trying to use backup root at mount time BTRFS info (device loop4): use zlib compression BTRFS info (device loop4): enabling ssd optimizations BTRFS info (device loop4): using spread ssd allocation scheme BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents 8021q: adding VLAN 0 to HW filter on device batadv3 bond3: Enslaving batadv3 as a backup interface with an up link bridge0: port 5(bond3) entered blocking state batman_adv: batadv2: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv2: No MLD Querier present - multicast optimizations disabled bridge0: port 5(bond3) entered disabled state device bond3 entered promiscuous mode device batadv3 entered promiscuous mode 8021q: adding VLAN 0 to HW filter on device batadv1 bond1: Enslaving batadv1 as a backup interface with an up link bridge0: port 3(bond1) entered blocking state bridge0: port 3(bond1) entered disabled state device bond1 entered promiscuous mode device batadv1 entered promiscuous mode 8021q: adding VLAN 0 to HW filter on device batadv4 bond4: Enslaving batadv4 as a backup interface with an up link bridge0: port 6(bond4) entered blocking state bridge0: port 6(bond4) entered disabled state device bond4 entered promiscuous mode device batadv4 entered promiscuous mode 8021q: adding VLAN 0 to HW filter on device batadv2 bond2: Enslaving batadv2 as a backup interface with an up link bridge0: port 4(bond2) entered blocking state bridge0: port 4(bond2) entered disabled state device bond2 entered promiscuous mode device batadv2 entered promiscuous mode 8021q: adding VLAN 0 to HW filter on device batadv5 bond5: Enslaving batadv5 as a backup interface with an up link batman_adv: batadv3: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv3: No MLD Querier present - multicast optimizations disabled bridge0: port 7(bond5) entered blocking state bridge0: port 7(bond5) entered disabled state device bond5 entered promiscuous mode device batadv5 entered promiscuous mode 8021q: adding VLAN 0 to HW filter on device batadv3 bond3: Enslaving batadv3 as a backup interface with an up link batman_adv: batadv1: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv1: No MLD Querier present - multicast optimizations disabled bridge0: port 5(bond3) entered blocking state bridge0: port 5(bond3) entered disabled state device bond3 entered promiscuous mode batman_adv: batadv4: No IGMP Querier present - multicast optimizations disabled device batadv3 entered promiscuous mode batman_adv: batadv4: No MLD Querier present - multicast optimizations disabled 8021q: adding VLAN 0 to HW filter on device batadv6 bond6: Enslaving batadv6 as a backup interface with an up link bridge0: port 8(bond6) entered blocking state bridge0: port 8(bond6) entered disabled state device bond6 entered promiscuous mode device batadv6 entered promiscuous mode batman_adv: batadv2: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv2: No MLD Querier present - multicast optimizations disabled 8021q: adding VLAN 0 to HW filter on device batadv4 bond4: Enslaving batadv4 as a backup interface with an up link 8021q: adding VLAN 0 to HW filter on device batadv7 bond7: Enslaving batadv7 as a backup interface with an up link bridge0: port 6(bond4) entered blocking state batman_adv: batadv5: No IGMP Querier present - multicast optimizations disabled bridge0: port 6(bond4) entered disabled state batman_adv: batadv5: No MLD Querier present - multicast optimizations disabled device bond4 entered promiscuous mode device batadv4 entered promiscuous mode bridge0: port 9(bond7) entered blocking state bridge0: port 9(bond7) entered disabled state device bond7 entered promiscuous mode device batadv7 entered promiscuous mode batman_adv: batadv3: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv3: No MLD Querier present - multicast optimizations disabled 8021q: adding VLAN 0 to HW filter on device batadv5 bond5: Enslaving batadv5 as a backup interface with an up link batman_adv: batadv6: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv6: No MLD Querier present - multicast optimizations disabled bridge0: port 7(bond5) entered blocking state bridge0: port 7(bond5) entered disabled state device bond5 entered promiscuous mode device batadv5 entered promiscuous mode batman_adv: batadv4: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv4: No MLD Querier present - multicast optimizations disabled batman_adv: batadv7: No IGMP Querier present - multicast optimizations disabled 8021q: adding VLAN 0 to HW filter on device batadv6 batman_adv: batadv7: No MLD Querier present - multicast optimizations disabled bond6: Enslaving batadv6 as a backup interface with an up link bridge0: port 8(bond6) entered blocking state bridge0: port 8(bond6) entered disabled state device bond6 entered promiscuous mode device batadv6 entered promiscuous mode kauditd_printk_skb: 16 callbacks suppressed audit: type=1804 audit(1677663282.724:62): pid=13457 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2425402028/syzkaller.wCI4ms/104/bus" dev="sda1" ino=14270 res=1 audit: type=1804 audit(1677663282.744:63): pid=13457 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir2425402028/syzkaller.wCI4ms/104/bus" dev="sda1" ino=14270 res=1 batman_adv: batadv5: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv5: No MLD Querier present - multicast optimizations disabled audit: type=1804 audit(1677663282.864:64): pid=13472 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir2425402028/syzkaller.wCI4ms/104/bus" dev="sda1" ino=14270 res=1 audit: type=1804 audit(1677663282.944:65): pid=13473 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir2425402028/syzkaller.wCI4ms/104/bus" dev="sda1" ino=14270 res=1 batman_adv: batadv6: No IGMP Querier present - multicast optimizations disabled batman_adv: batadv6: No MLD Querier present - multicast optimizations disabled audit: type=1804 audit(1677663283.124:66): pid=13484 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir2425402028/syzkaller.wCI4ms/105/bus" dev="sda1" ino=14202 res=1 audit: type=1804 audit(1677663283.124:67): pid=13484 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir2425402028/syzkaller.wCI4ms/105/bus" dev="sda1" ino=14202 res=1 audit: type=1804 audit(1677663283.144:68): pid=13485 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir3972156634/syzkaller.h5PZTl/99/bus" dev="sda1" ino=14248 res=1 audit: type=1804 audit(1677663283.144:69): pid=13485 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir3972156634/syzkaller.h5PZTl/99/bus" dev="sda1" ino=14248 res=1 audit: type=1804 audit(1677663283.264:70): pid=13496 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.4" name="/root/syzkaller-testdir2425402028/syzkaller.wCI4ms/105/bus" dev="sda1" ino=14202 res=1 audit: type=1804 audit(1677663283.284:71): pid=13497 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.5" name="/root/syzkaller-testdir3972156634/syzkaller.h5PZTl/99/bus" dev="sda1" ino=14248 res=1 kvm: emulating exchange as write IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect