ocfs2: Mounting device (7,2) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.2.361/5708 is trying to acquire lock: ffff88805678d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #4){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #4){+.+.}-{3:3}, at: ocfs2_reserve_local_alloc_bits+0x11e/0x2770 fs/ocfs2/localalloc.c:635 but task is already holding lock: ffff8880726a94a0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_write_begin+0x194/0x310 fs/ocfs2/aops.c:1904 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}: down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 ocfs2_read_virt_blocks+0x266/0x980 fs/ocfs2/extent_map.c:984 ocfs2_read_dir_block fs/ocfs2/dir.c:508 [inline] ocfs2_find_entry_el fs/ocfs2/dir.c:776 [inline] ocfs2_find_entry+0x3a8/0x2080 fs/ocfs2/dir.c:1152 ocfs2_find_files_on_disk+0x102/0x390 fs/ocfs2/dir.c:2056 ocfs2_lookup_ino_from_name+0x4f/0xf0 fs/ocfs2/dir.c:2078 ocfs2_find_victim_alloc_group+0x203/0x9e0 fs/ocfs2/move_extents.c:385 ocfs2_move_extent fs/ocfs2/move_extents.c:658 [inline] __ocfs2_move_extents_range+0x1c72/0x3450 fs/ocfs2/move_extents.c:868 ocfs2_move_extents+0x409/0xa40 fs/ocfs2/move_extents.c:940 ocfs2_ioctl_move_extents+0x4d4/0x6e0 fs/ocfs2/move_extents.c:1066 ocfs2_ioctl+0x31d/0x7c0 fs/ocfs2/ioctl.c:946 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #2 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 ocfs2_start_trans+0x3a4/0x6f0 fs/ocfs2/journal.c:374 ocfs2_mknod+0x1266/0x2500 fs/ocfs2/namei.c:361 ocfs2_create+0x1b6/0x4b0 fs/ocfs2/namei.c:676 lookup_open fs/namei.c:3533 [inline] open_last_lookups fs/namei.c:3601 [inline] path_openat+0x11b9/0x2f10 fs/namei.c:3835 do_filp_open+0x1ee/0x420 fs/namei.c:3865 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_open fs/open.c:1344 [inline] __se_sys_open fs/open.c:1340 [inline] __x64_sys_open+0x11b/0x140 fs/open.c:1340 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (sb_internal#4){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1897 [inline] sb_start_intwrite include/linux/fs.h:2019 [inline] ocfs2_start_trans+0x2a5/0x6f0 fs/ocfs2/journal.c:372 ocfs2_mknod+0x1266/0x2500 fs/ocfs2/namei.c:361 ocfs2_create+0x1b6/0x4b0 fs/ocfs2/namei.c:676 lookup_open fs/namei.c:3533 [inline] open_last_lookups fs/namei.c:3601 [inline] path_openat+0x11b9/0x2f10 fs/namei.c:3835 do_filp_open+0x1ee/0x420 fs/namei.c:3865 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_open fs/open.c:1344 [inline] __se_sys_open fs/open.c:1340 [inline] __x64_sys_open+0x11b/0x140 fs/open.c:1340 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 ( &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#4){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790 down_write+0x36/0x60 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:764 [inline] ocfs2_reserve_local_alloc_bits+0x11e/0x2770 fs/ocfs2/localalloc.c:635 ocfs2_reserve_clusters_with_limit+0x1b6/0xc10 fs/ocfs2/suballoc.c:1184 ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1245 [inline] ocfs2_lock_allocators+0x2ce/0x5f0 fs/ocfs2/suballoc.c:2701 ocfs2_write_begin_nolock+0x1bdd/0x4590 fs/ocfs2/aops.c:1742 ocfs2_write_begin+0x1b7/0x310 fs/ocfs2/aops.c:1906 generic_perform_write+0x2fa/0x5c0 mm/filemap.c:3862 __generic_file_write_iter+0x148/0x2a0 mm/filemap.c:3960 ocfs2_file_write_iter+0x1731/0x1fc0 fs/ocfs2/file.c:2469 call_write_iter include/linux/fs.h:2271 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x482/0x9a0 fs/read_write.c:584 ksys_write+0x14d/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#4 --> &journal->j_trans_barrier --> &ocfs2_file_ip_alloc_sem_key Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_file_ip_alloc_sem_key); lock(&journal->j_trans_barrier); lock(&ocfs2_file_ip_alloc_sem_key); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#4); *** DEADLOCK *** 4 locks held by syz.2.361/5708: #0: ffff8880301214e8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ae/0x360 fs/file.c:1038 #1: ffff88807e74c460 (sb_writers#16){.+.+}-{0:0}, at: vfs_write+0x270/0x9a0 fs/read_write.c:580 #2: ffff8880726a9808 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #2: ffff8880726a9808 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: ocfs2_file_write_iter+0x45a/0x1fc0 fs/ocfs2/file.c:2399 #3: ffff8880726a94a0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_write_begin+0x194/0x310 fs/ocfs2/aops.c:1904 stack backtrace: CPU: 0 PID: 5708 Comm: syz.2.361 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790 down_write+0x36/0x60 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:764 [inline] ocfs2_reserve_local_alloc_bits+0x11e/0x2770 fs/ocfs2/localalloc.c:635 ocfs2_reserve_clusters_with_limit+0x1b6/0xc10 fs/ocfs2/suballoc.c:1184 ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1245 [inline] ocfs2_lock_allocators+0x2ce/0x5f0 fs/ocfs2/suballoc.c:2701 ocfs2_write_begin_nolock+0x1bdd/0x4590 fs/ocfs2/aops.c:1742 ocfs2_write_begin+0x1b7/0x310 fs/ocfs2/aops.c:1906 generic_perform_write+0x2fa/0x5c0 mm/filemap.c:3862 __generic_file_write_iter+0x148/0x2a0 mm/filemap.c:3960 ocfs2_file_write_iter+0x1731/0x1fc0 fs/ocfs2/file.c:2469 call_write_iter include/linux/fs.h:2271 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x482/0x9a0 fs/read_write.c:584 ksys_write+0x14d/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f24933a94d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2494235028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f2493625fa0 RCX: 00007f24933a94d9 RDX: 00000000fffffdef RSI: 000020000000f500 RDI: 0000000000000006 RBP: 00007f249343804e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2493626038 R14: 00007f2493625fa0 R15: 00007ffc81491eb8 kcov: kcov_task_exit: t = ffff888026b23c00, kcov->t = ffff888026b23c00 ffff888030a44000 name hci1 bus 0 hci1: err 0x13 hci1 ffff888030a44000 hci1: hci1: err 0x13 hci1: cancelling interleave scan hci1 state 0 -> 0 All LE pending actions cleared hdev hci1 hcon ffff88802ab80000 reason 22 hcon ffff88802ab80000 conn ffff88802ab88800, err 103 hci1 hcon ffff88802ab80000 chan ffff88802515b100 hci1 hcon ffff88802ab80000 handle 201 hcon ffff88802ab80000 hci1: conn ffff88802ab80000 device: 'hci1:201': device_unregister kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs device: removing kernfs subsystem: removing kernfs hci1:201: removing kernfs uevent: removing PM: Removing info for No Bus:hci1:201 kobject: 'hci1:201' (ffff88802ab80618): kobject_uevent_env kobject: 'hci1:201' (ffff88802ab80618): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/hci1:201' kernfs hci1:201: removing kobject: 'hci1:201' (ffff88802ab80618): kobject_cleanup, parent 0000000000000000 kobject: 'hci1:201' (ffff88802ab80618): calling ktype release kobject: 'hci1:201': free name hci1 orig refcnt 10 hcon ffff888072d94000 reason 22 hcon ffff888072d94000 conn ffff88802ab88000, err 103 hci1 hcon ffff888072d94000 chan ffff88802515bf00 hci1 hcon ffff888072d94000 handle 200 hcon ffff888072d94000 hci1: conn ffff888072d94000 device: 'hci1:200': device_unregister kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs device: removing kernfs subsystem: removing kernfs hci1:200: removing kernfs uevent: removing PM: Removing info for No Bus:hci1:200 kobject: 'hci1:200' (ffff888072d94618): kobject_uevent_env kobject: 'hci1:200' (ffff888072d94618): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/hci1:200' kernfs hci1:200: removing kobject: 'hci1:200' (ffff888072d94618): kobject_cleanup, parent 0000000000000000 kobject: 'hci1:200' (ffff888072d94618): calling ktype release kobject: 'hci1:200': free name hci1 orig refcnt 7 hdev hci1 event 4 hdev 0000000000000000 len 8 hci1: Cleanup of MSFT extension hdev hci1 event 8 hci1 orig refcnt 6 channel 3 len 6 channel 3 len 8 hdev hci1 event 2 hdev 0000000000000000 len 8 kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs device: removing kernfs subsystem: removing kernfs rfkill5: removing kernfs uevent: removing kernfs name: removing kernfs type: removing kernfs index: removing kernfs persistent: removing kernfs state: removing kernfs soft: removing kernfs hard: removing kernfs hard_block_reasons: removing PM: Removing info for No Bus:rfkill5 kobject: 'rfkill5' (ffff8881426b6110): kobject_uevent_env kobject: 'rfkill5' (ffff8881426b6110): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill5' kernfs rfkill5: removing kobject: 'rfkill5' (ffff8881426b6110): kobject_cleanup, parent 0000000000000000 kobject: 'rfkill5' (ffff8881426b6110): calling ktype release kobject: 'rfkill5': free name kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs subsystem: removing kernfs hci1: removing kernfs uevent: removing PM: Removing info for No Bus:hci1 kobject: 'hci1' (ffff888030a457f8): kobject_uevent_env kobject: 'hci1' (ffff888030a457f8): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' kernfs hci1: removing hci1 orig refcnt 2 kobject: 'hci1' (ffff888030a457f8): kobject_cleanup, parent 0000000000000000 kobject: 'hci1' (ffff888030a457f8): calling ktype release All LE connection parameters were removed hci1: Unregister MSFT extension kobject: 'hci1': free name Deleting ac1414aa/32 dsfield=0x00 t=ffff88802ae884b0 In tnode_resize ffff888075bcd720 inflate_threshold=50 threshold=25 In tnode_resize ffff88802ae88fa0 inflate_threshold=50 threshold=25 sctp: sctp_addr_wq_mgmt: add new entry for cmd:2, addr:172.20.20.170 in wq:ffff888029c5c758 syz_tun (unregistering): bond_netdev_event received NETDEV_UNREGISTER net syz_tun: siw: event 6 tipc: Disabling bearer kobject: 'rx-0' (ffff888029a52250): kobject_cleanup, parent ffff88801a2bd350 kobject: 'rx-0' (ffff888029a52250): auto cleanup kobject_del kernfs rps_cpus: removing kernfs rps_flow_cnt: removing kobject: 'rx-0' (ffff888029a52250): auto cleanup 'remove' event kobject: 'rx-0' (ffff888029a52250): kobject_uevent_env kobject: 'rx-0' (ffff888029a52250): fill_kobj_path: path = '/devices/virtual/net/syz_tun/queues/rx-0' kernfs rx-0: removing kobject: 'rx-0' (ffff888029a52250): calling ktype release kobject: 'rx-0': free name kernfs limit: removing kernfs limit_max: removing kernfs limit_min: removing kernfs hold_time: removing kernfs inflight: removing kernfs byte_queue_limits: removing kobject: 'tx-0' (ffff88805a7e9420): kobject_cleanup, parent ffff88801a2bd350 kobject: 'tx-0' (ffff88805a7e9420): auto cleanup kobject_del kernfs tx_timeout: removing kernfs traffic_class: removing kernfs xps_cpus: removing kernfs xps_rxqs: removing kernfs tx_maxrate: removing kobject: 'tx-0' (ffff88805a7e9420): auto cleanup 'remove' event kobject: 'tx-0' (ffff88805a7e9420): kobject_uevent_env kobject: 'tx-0' (ffff88805a7e9420): fill_kobj_path: path = '/devices/virtual/net/syz_tun/queues/tx-0' kernfs tx-0: removing kobject: 'tx-0' (ffff88805a7e9420): calling ktype release kobject: 'tx-0': free name kernfs queues: removing kobject: 'queues' (ffff88801a2bd350): kobject_cleanup, parent 0000000000000000 kobject: 'queues' (ffff88801a2bd350): calling ktype release kobject: 'queues' (ffff88801a2bd350): kset_release kobject: 'queues': free name kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs subsystem: removing kernfs syz_tun: removing kernfs uevent: removing kernfs tun_flags: removing kernfs owner: removing kernfs group: removing kernfs rx_packets: removing kernfs tx_packets: removing kernfs rx_bytes: removing kernfs tx_bytes: removing kernfs rx_errors: removing kernfs tx_errors: removing kernfs rx_dropped: removing kernfs tx_dropped: removing kernfs multicast: removing kernfs collisions: removing kernfs rx_length_errors: removing kernfs rx_over_errors: removing kernfs rx_crc_errors: removing kernfs rx_frame_errors: removing kernfs rx_fifo_errors: removing kernfs rx_missed_errors: removing kernfs tx_aborted_errors: removing kernfs tx_carrier_errors: removing kernfs tx_fifo_errors: removing kernfs tx_heartbeat_errors: removing kernfs tx_window_errors: removing kernfs rx_compressed: removing kernfs tx_compressed: removing kernfs rx_nohandler: removing kernfs statistics: removing kernfs netdev_group: removing kernfs type: removing kernfs dev_id: removing kernfs dev_port: removing kernfs iflink: removing kernfs ifindex: removing kernfs name_assign_type: removing kernfs addr_assign_type: removing kernfs addr_len: removing kernfs link_mode: removing kernfs address: removing kernfs broadcast: removing kernfs speed: removing kernfs duplex: removing kernfs dormant: removing kernfs testing: removing kernfs operstate: removing kernfs carrier_changes: removing kernfs ifalias: removing kernfs carrier: removing kernfs mtu: removing kernfs flags: removing kernfs tx_queue_len: removing kernfs gro_flush_timeout: removing kernfs napi_defer_hard_irqs: removing kernfs phys_port_id: removing kernfs phys_port_name: removing kernfs phys_switch_id: removing kernfs proto_down: removing kernfs carrier_up_count: removing kernfs carrier_down_count: removing kernfs threaded: removing PM: Removing info for No Bus:syz_tun kobject: 'syz_tun' (ffff88805a1746d0): kobject_uevent_env kobject: 'syz_tun' (ffff88805a1746d0): fill_kobj_path: path = '/devices/virtual/net/syz_tun' kernfs syz_tun: removing kobject: 'syz_tun' (ffff88805a1746d0): kobject_cleanup, parent 0000000000000000 kobject: 'syz_tun' (ffff88805a1746d0): calling ktype release kobject: 'syz_tun': free name kernfs check: removing kernfs fix: removing kernfs set: removing kernfs filecheck: removing kobject: 'filecheck' (ffff8880785e9430): kobject_cleanup, parent 0000000000000000 kobject: 'filecheck' (ffff8880785e9430): calling ktype release kobject: 'filecheck': free name kernfs loop2: removing kobject: 'loop2' (ffff88805708ab50): kobject_cleanup, parent 0000000000000000 kobject: 'loop2' (ffff88805708ab50): calling ktype release kobject: 'loop2' (ffff88805708ab50): kset_release kobject: 'loop2': free name ocfs2: Unmounting device (7,2) on (node local) kernfs backing_file: removing kernfs offset: removing kernfs sizelimit: removing kernfs autoclear: removing kernfs partscan: removing kernfs dio: removing kernfs loop: removing kobject: 'loop2' (ffff888024ecd848): kobject_uevent_env kobject: 'loop2' (ffff888024ecd848): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop2' (ffff888024ecd848): kobject_uevent_env kobject: 'loop2' (ffff888024ecd848): fill_kobj_path: path = '/devices/virtual/block/loop2'