BTRFS info (device loop2): clearing free space tree BTRFS info (device loop2): clearing 1 ro feature flag BTRFS info (device loop2): clearing 2 ro feature flag BTRFS info (device loop2): checking UUID tree ====================================================== WARNING: possible circular locking dependency detected 4.14.306-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/10140 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.2/10140: #0: (&fs_info->scrub_lock){+.+.}, at: [] btrfs_scrub_dev+0x506/0xcd0 fs/btrfs/scrub.c:4217 stack backtrace: CPU: 0 PID: 10140 Comm: syz-executor.2 Not tainted 4.14.306-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:0x7fda75be90f9 RSP: 002b:00007fda7415b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fda75d08f80 RCX: 00007fda75be90f9 RDX: 0000000020000100 RSI: 00000000c400941b RDI: 000000000000000a RBP: 00007fda75c44ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe91b1065f R14: 00007fda7415b300 R15: 0000000000022000 BTRFS info (device loop5): enabling inode map caching BTRFS info (device loop5): force clearing of disk cache BTRFS info (device loop5): disabling free space tree BTRFS info (device loop5): has skinny extents BTRFS info (device loop5): clearing free space tree BTRFS info (device loop5): clearing 1 ro feature flag BTRFS info (device loop5): clearing 2 ro feature flag BTRFS info (device loop5): checking UUID tree ====================================================== WARNING: the mand mount option is being deprecated and will be removed in v5.15! ====================================================== program syz-executor.4 is using a deprecated SCSI ioctl, please convert it to SG_IO sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0 BTRFS info (device loop2): enabling inode map caching overlayfs: filesystem on './bus' not supported BTRFS info (device loop2): force clearing of disk cache BTRFS info (device loop2): disabling free space tree dccp_close: ABORT with 3 bytes unread BTRFS info (device loop2): has skinny extents BTRFS info (device loop2): clearing free space tree BTRFS info (device loop2): clearing 1 ro feature flag BTRFS info (device loop2): clearing 2 ro feature flag BTRFS info (device loop2): checking UUID tree program syz-executor.0 is using a deprecated SCSI ioctl, please convert it to SG_IO overlayfs: filesystem on './bus' not supported sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0 overlayfs: filesystem on './bus' not supported dccp_close: ABORT with 3 bytes unread BTRFS info (device loop3): enabling inode map caching BTRFS info (device loop3): force clearing of disk cache BTRFS info (device loop3): disabling free space tree BTRFS info (device loop3): has skinny extents BTRFS info (device loop3): clearing free space tree BTRFS info (device loop3): clearing 1 ro feature flag BTRFS info (device loop3): clearing 2 ro feature flag BTRFS info (device loop3): checking UUID tree program syz-executor.0 is using a deprecated SCSI ioctl, please convert it to SG_IO sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0 overlayfs: filesystem on './bus' not supported overlayfs: workdir and upperdir must be separate subtrees dccp_close: ABORT with 3 bytes unread overlayfs: workdir and upperdir must be separate subtrees overlayfs: filesystem on './bus' not supported program syz-executor.0 is using a deprecated SCSI ioctl, please convert it to SG_IO sd 0:0:1:0: ioctl_internal_command: ILLEGAL REQUEST asc=0x20 ascq=0x0 overlayfs: filesystem on './bus' not supported overlayfs: filesystem on './bus' not supported overlayfs: filesystem on './bus' not supported audit: type=1326 audit(1677303231.307:2): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=10719 comm="syz-executor.1" exe="/root/syz-executor.1" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f0e850aa0f9 code=0x0 syz-executor.5 (10813): drop_caches: 0 audit: type=1804 audit(1677303232.427:3): pid=10869 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir1227394488/syzkaller.xSFIzq/47/file0/bus" dev="loop1" ino=11 res=1 ntfs: volume version 3.1. ntfs: (device loop1): ntfs_setattr(): Changes in user/group/mode are not supported yet, ignoring. ntfs: volume version 3.1. ntfs: (device loop1): ntfs_setattr(): Changes in user/group/mode are not supported yet, ignoring. ntfs: volume version 3.1. ntfs: (device loop1): ntfs_setattr(): Changes in user/group/mode are not supported yet, ignoring. PM: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: Marking nosave pages: [mem 0xbfffd000-0xffffffff] PM: Basic memory bitmaps created PM: Basic memory bitmaps freed PM: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: Marking nosave pages: [mem 0x0009f000-0x000fffff] ntfs: volume version 3.1. PM: Marking nosave pages: [mem 0xbfffd000-0xffffffff] ntfs: (device loop1): ntfs_setattr(): Changes in user/group/mode are not supported yet, ignoring. PM: Basic memory bitmaps created PM: Basic memory bitmaps freed IPVS: ftp: loaded support on port[0] = 21 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue ISO 9660 Extensions: Microsoft Joliet Level 3 ISOFS: changing to secondary root IPVS: ftp: loaded support on port[0] = 21 ISO 9660 Extensions: Microsoft Joliet Level 3 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue ISOFS: changing to secondary root print_req_error: I/O error, dev loop1, sector 0 netlink: 160 bytes leftover after parsing attributes in process `syz-executor.4'. ISO 9660 Extensions: Microsoft Joliet Level 3 ISOFS: changing to secondary root netlink: 160 bytes leftover after parsing attributes in process `syz-executor.4'. audit: type=1800 audit(1677303234.847:4): pid=11327 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="file0" dev="loop0" ino=12 res=0 netlink: 160 bytes leftover after parsing attributes in process `syz-executor.4'. audit: type=1804 audit(1677303234.907:5): pid=11342 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir2089846379/syzkaller.ZJkCDh/79/file0/file0" dev="loop0" ino=12 res=1 audit: type=1800 audit(1677303234.987:6): pid=11344 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="file0" dev="loop3" ino=13 res=0 audit: type=1804 audit(1677303235.017:7): pid=11344 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir929780213/syzkaller.rsiMy3/64/file0/file0" dev="loop3" ino=13 res=1 netlink: 160 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 52 bytes leftover after parsing attributes in process `syz-executor.4'. tc_dump_action: action bad kind netlink: 156 bytes leftover after parsing attributes in process `syz-executor.4'. device veth0_vlan left promiscuous mode