====================================================== WARNING: possible circular locking dependency detected 4.14.307-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/9728 is trying to acquire lock: ("%s-%s""btrfs", name){+.+.}, at: [] flush_workqueue+0xcb/0x1310 kernel/workqueue.c:2622 but task is already holding lock: overlayfs: unrecognized mount option "nfs_export=on" or missing value (&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.4/9728: #0: (&fs_info->scrub_lock){+.+.}, at: [] btrfs_scrub_dev+0x506/0xcd0 fs/btrfs/scrub.c:4217 stack backtrace: CPU: 0 PID: 9728 Comm: syz-executor.4 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 L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details. 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:0x7f9b706b90f9 RSP: 002b:00007f9b6ec2b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f9b707d8f80 RCX: 00007f9b706b90f9 RDX: 0000000020000100 RSI: 00000000c400941b RDI: 0000000000000004 RBP: 00007f9b70714ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe91952c8f R14: 00007f9b6ec2b300 R15: 0000000000022000 NILFS (loop0): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop0): segctord starting. Construction interval = 5 seconds, CP frequency < 30 seconds attempt to access beyond end of device loop3: rw=1, want=2064, limit=2048 BTRFS info (device loop5): enabling inode map caching BTRFS info (device loop5): trying to use backup root at mount time print_req_error: I/O error, dev loop3, sector 0 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 attempt to access beyond end of device loop3: rw=1, want=2064, limit=2048 overlayfs: unrecognized mount option "nfs_export=on" or missing value team0: Port device ipvlan1 added syz-executor.0 (9886) used greatest stack depth: 24464 bytes left 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 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 ntfs: volume version 3.1. ntfs: volume version 3.1. UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) REISERFS (device loop1): found reiserfs format "3.5" with non-standard journal REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop1): Using r5 hash to sort names reiserfs: enabling write barrier flush mode REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) XFS (loop2): Mounting V4 Filesystem XFS (loop2): Ending clean mount XFS (loop2): Unmounting Filesystem ntfs: volume version 3.1. REISERFS (device loop1): found reiserfs format "3.5" with non-standard journal REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop1): Using r5 hash to sort names reiserfs: enabling write barrier flush mode REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. XFS (loop2): Mounting V4 Filesystem XFS (loop2): Ending clean mount syz-executor.2 (10165) used greatest stack depth: 23424 bytes left XFS (loop2): Unmounting Filesystem REISERFS (device loop1): found reiserfs format "3.5" with non-standard journal REISERFS (device loop1): using ordered data mode ntfs: volume version 3.1. reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop1): Using r5 hash to sort names reiserfs: enabling write barrier flush mode REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop1): found reiserfs format "3.5" with non-standard journal XFS (loop4): Mounting V4 Filesystem REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers XFS (loop4): Ending clean mount REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop1): Using r5 hash to sort names reiserfs: enabling write barrier flush mode REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage. XFS (loop2): Mounting V4 Filesystem XFS (loop4): Unmounting Filesystem XFS (loop2): Ending clean mount syz-executor.2 (10246) used greatest stack depth: 23312 bytes left XFS (loop2): Unmounting Filesystem XFS (loop5): Mounting V4 Filesystem XFS (loop5): Ending clean mount XFS (loop5): Unmounting Filesystem vivid-000: ================= START STATUS ================= vivid-000: FM Deviation: 75000 bridge0: port 2(bridge_slave_1) entered disabled state bridge0: port 1(bridge_slave_0) entered disabled state vivid-000: ================== END STATUS ================== batman_adv: batadv0: Interface deactivated: batadv_slave_0 batman_adv: batadv0: Interface deactivated: batadv_slave_1 vivid-000: ================= START STATUS ================= vivid-000: FM Deviation: 75000 vivid-000: ================== END STATUS ================== vivid-000: ================= START STATUS ================= vivid-000: FM Deviation: 75000 vivid-000: ================== END STATUS ================== vivid-000: ================= START STATUS ================= vivid-000: FM Deviation: 75000 vivid-000: ================== END STATUS ================== vivid-006: ================= START STATUS ================= vivid-006: FM Deviation: 75000 vivid-006: ================== END STATUS ==================