9pnet: Insufficient options for proto=fd 9pnet: Insufficient options for proto=fd 9pnet: Insufficient options for proto=fd 9pnet: Insufficient options for proto=fd ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/24804 is trying to acquire lock: 000000004859964b (sb_internal#4){.+.+}, at: sb_start_intwrite include/linux/fs.h:1626 [inline] 000000004859964b (sb_internal#4){.+.+}, at: start_transaction+0xa37/0xf90 fs/btrfs/transaction.c:528 9pnet: Insufficient options for proto=fd but task is already holding lock: 000000000167ebf5 (&mm->mmap_sem){++++}, at: vm_mmap_pgoff+0x152/0x200 mm/util.c:355 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (&mm->mmap_sem){++++}: 9pnet: Insufficient options for proto=fd _copy_to_user+0x29/0x100 lib/usercopy.c:25 copy_to_user include/linux/uaccess.h:155 [inline] filldir+0x225/0x400 fs/readdir.c:236 dir_emit_dot include/linux/fs.h:3432 [inline] hfsplus_readdir+0x3c2/0xf20 fs/hfsplus/dir.c:159 9pnet: Insufficient options for proto=fd iterate_dir+0x473/0x5c0 fs/readdir.c:51 __do_sys_getdents fs/readdir.c:271 [inline] __se_sys_getdents+0x175/0x2d0 fs/readdir.c:252 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe 9pnet: Insufficient options for proto=fd -> #5 (&tree->tree_lock){+.+.}: hfsplus_find_init+0x1b7/0x220 fs/hfsplus/bfind.c:30 hfsplus_cat_write_inode+0x221/0x860 fs/hfsplus/inode.c:547 hfsplus_write_inode fs/hfsplus/super.c:159 [inline] hfsplus_write_inode+0x8f/0x4b0 fs/hfsplus/super.c:146 write_inode fs/fs-writeback.c:1244 [inline] __writeback_single_inode+0x733/0x11d0 fs/fs-writeback.c:1442 writeback_sb_inodes+0x537/0xef0 fs/fs-writeback.c:1647 9pnet: Insufficient options for proto=fd wb_writeback+0x28d/0xcc0 fs/fs-writeback.c:1820 wb_do_writeback fs/fs-writeback.c:1965 [inline] wb_workfn+0x29b/0x1250 fs/fs-writeback.c:2006 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 9pnet: Insufficient options for proto=fd -> #4 ((work_completion)(&(&wb->dwork)->work)){+.+.}: wb_shutdown+0x172/0x210 mm/backing-dev.c:374 bdi_unregister+0x169/0x610 mm/backing-dev.c:946 del_gendisk+0x7f6/0xa80 block/genhd.c:788 loop_remove drivers/block/loop.c:2066 [inline] loop_control_ioctl drivers/block/loop.c:2165 [inline] loop_control_ioctl+0x3b1/0x480 drivers/block/loop.c:2131 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 9pnet: Insufficient options for proto=fd ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #3 (loop_ctl_mutex){+.+.}: lo_open+0x19/0xd0 drivers/block/loop.c:1771 __blkdev_get+0x372/0x1480 fs/block_dev.c:1494 9pnet: Insufficient options for proto=fd blkdev_get+0xb0/0x940 fs/block_dev.c:1627 blkdev_open+0x202/0x290 fs/block_dev.c:1788 do_dentry_open+0x4aa/0x1160 fs/open.c:796 do_last fs/namei.c:3421 [inline] path_openat+0x793/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 9pnet: Insufficient options for proto=fd entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #2 (&bdev->bd_mutex){+.+.}: blkdev_put+0x30/0x520 fs/block_dev.c:1839 btrfs_close_bdev fs/btrfs/volumes.c:1033 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1057 [inline] close_fs_devices.part.0+0x24d/0x8e0 fs/btrfs/volumes.c:1085 close_fs_devices fs/btrfs/volumes.c:1117 [inline] btrfs_close_devices+0x95/0x1f0 fs/btrfs/volumes.c:1103 open_ctree+0x26b/0x61e0 fs/btrfs/disk-io.c:3326 9pnet: Insufficient options for proto=fd btrfs_fill_super fs/btrfs/super.c:1209 [inline] btrfs_mount_root+0x12e5/0x1830 fs/btrfs/super.c:1613 mount_fs+0xa3/0x310 fs/super.c:1261 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961 vfs_kern_mount+0x3c/0x60 fs/namespace.c:951 btrfs_mount+0x23a/0xaa0 fs/btrfs/super.c:1681 mount_fs+0xa3/0x310 fs/super.c:1261 9pnet: Insufficient options for proto=fd vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2492 [inline] do_mount+0x115c/0x2f50 fs/namespace.c:2822 ksys_mount+0xcf/0x130 fs/namespace.c:3038 __do_sys_mount fs/namespace.c:3052 [inline] __se_sys_mount fs/namespace.c:3049 [inline] __x64_sys_mount+0xba/0x150 fs/namespace.c:3049 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe 9pnet: Insufficient options for proto=fd -> #1 (&fs_devs->device_list_mutex){+.+.}: btrfs_finish_chunk_alloc+0x27b/0xf90 fs/btrfs/volumes.c:4938 btrfs_create_pending_block_groups+0x242/0x590 fs/btrfs/extent-tree.c:10134 __btrfs_end_transaction+0x21a/0xb00 fs/btrfs/transaction.c:855 flush_space+0xa41/0xee0 fs/btrfs/extent-tree.c:4861 btrfs_async_reclaim_metadata_space+0x466/0x1050 fs/btrfs/extent-tree.c:4977 9pnet: Insufficient options for proto=fd process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #0 (sb_internal#4){.+.+}: 9pnet: Insufficient options for proto=fd percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x6e/0x2a0 fs/super.c:1366 sb_start_intwrite include/linux/fs.h:1626 [inline] start_transaction+0xa37/0xf90 fs/btrfs/transaction.c:528 btrfs_dirty_inode+0xe3/0x210 fs/btrfs/inode.c:6165 btrfs_update_time+0x33b/0x3d0 fs/btrfs/inode.c:6207 update_time fs/inode.c:1675 [inline] touch_atime+0x23c/0x2a0 fs/inode.c:1746 file_accessed include/linux/fs.h:2123 [inline] btrfs_file_mmap+0x11b/0x160 fs/btrfs/file.c:2274 9pnet: Insufficient options for proto=fd call_mmap include/linux/fs.h:1826 [inline] mmap_region+0xc94/0x16b0 mm/mmap.c:1757 do_mmap+0x8e8/0x1080 mm/mmap.c:1530 do_mmap_pgoff include/linux/mm.h:2329 [inline] vm_mmap_pgoff+0x197/0x200 mm/util.c:357 ksys_mmap_pgoff+0x298/0x5a0 mm/mmap.c:1580 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: 9pnet: Insufficient options for proto=fd Chain exists of: sb_internal#4 --> &tree->tree_lock --> &mm->mmap_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(&tree->tree_lock); lock(&mm->mmap_sem); lock(sb_internal#4); *** DEADLOCK *** 2 locks held by syz-executor.4/24804: #0: 000000000167ebf5 (&mm->mmap_sem){++++}, at: vm_mmap_pgoff+0x152/0x200 mm/util.c:355 9pnet: Insufficient options for proto=fd #1: 00000000a6a5efba (sb_writers#29){.+.+}, at: sb_start_write_trylock include/linux/fs.h:1584 [inline] #1: 00000000a6a5efba (sb_writers#29){.+.+}, at: touch_atime+0x152/0x2a0 fs/inode.c:1731 stack backtrace: CPU: 0 PID: 24804 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 9pnet: Insufficient options for proto=fd Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 9pnet: Insufficient options for proto=fd check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 9pnet: Insufficient options for proto=fd lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 9pnet: Insufficient options for proto=fd percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x6e/0x2a0 fs/super.c:1366 sb_start_intwrite include/linux/fs.h:1626 [inline] start_transaction+0xa37/0xf90 fs/btrfs/transaction.c:528 9pnet: Insufficient options for proto=fd btrfs_dirty_inode+0xe3/0x210 fs/btrfs/inode.c:6165 btrfs_update_time+0x33b/0x3d0 fs/btrfs/inode.c:6207 9pnet: Insufficient options for proto=fd update_time fs/inode.c:1675 [inline] touch_atime+0x23c/0x2a0 fs/inode.c:1746 9pnet: Insufficient options for proto=fd file_accessed include/linux/fs.h:2123 [inline] btrfs_file_mmap+0x11b/0x160 fs/btrfs/file.c:2274 call_mmap include/linux/fs.h:1826 [inline] mmap_region+0xc94/0x16b0 mm/mmap.c:1757 9pnet: Insufficient options for proto=fd do_mmap+0x8e8/0x1080 mm/mmap.c:1530 do_mmap_pgoff include/linux/mm.h:2329 [inline] vm_mmap_pgoff+0x197/0x200 mm/util.c:357 9pnet: Insufficient options for proto=fd ksys_mmap_pgoff+0x298/0x5a0 mm/mmap.c:1580 9pnet: Insufficient options for proto=fd 9pnet: Insufficient options for proto=fd do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f7cf542b0f9 9pnet: Insufficient options for proto=fd Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7cec57c168 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f7cf554b050 RCX: 00007f7cf542b0f9 RDX: 0000000000000000 RSI: 0000000000b36000 RDI: 0000000020000000 RBP: 00007f7cf5486ae9 R08: 0000000000000009 R09: 0000000000000000 R10: 0000000000028011 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdb135f2cf R14: 00007f7cec57c300 R15: 0000000000022000 audit: type=1804 audit(1676387065.494:578): pid=24817 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 9pnet: Insufficient options for proto=fd audit: type=1804 audit(1676387065.554:579): pid=24816 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 audit: type=1804 audit(1676387065.554:580): pid=24816 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 audit: type=1804 audit(1676387065.554:581): pid=24816 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 audit: type=1804 audit(1676387065.554:582): pid=24816 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 audit: type=1804 audit(1676387065.554:583): pid=24816 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 audit: type=1804 audit(1676387065.554:584): pid=24816 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 audit: type=1804 audit(1676387065.554:585): pid=24816 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 audit: type=1804 audit(1676387065.554:586): pid=24816 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir3498355771/syzkaller.zv4ecw/3955/bus" dev="sda1" ino=15247 res=1 BTRFS info (device loop4): enabling inode map caching BTRFS info (device loop4): force clearing of disk cache BTRFS info (device loop4): disabling free space tree BTRFS info (device loop4): has skinny extents BTRFS info (device loop4): clearing free space tree BTRFS info (device loop4): clearing 1 ro feature flag BTRFS info (device loop4): clearing 2 ro feature flag ---------------- Code disassembly (best guess): 0: 28 00 sub %al,(%rax) 2: 00 00 add %al,(%rax) 4: 75 05 jne 0xb 6: 48 83 c4 28 add $0x28,%rsp a: c3 retq b: e8 f1 19 00 00 callq 0x1a01 10: 90 nop 11: 48 89 f8 mov %rdi,%rax 14: 48 89 f7 mov %rsi,%rdi 17: 48 89 d6 mov %rdx,%rsi 1a: 48 89 ca mov %rcx,%rdx 1d: 4d 89 c2 mov %r8,%r10 20: 4d 89 c8 mov %r9,%r8 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9 28: 0f 05 syscall * 2a: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction 30: 73 01 jae 0x33 32: c3 retq 33: 48 c7 c1 b8 ff ff ff mov $0xffffffffffffffb8,%rcx 3a: f7 d8 neg %eax 3c: 64 89 01 mov %eax,%fs:(%rcx) 3f: 48 rex.W