====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/4191 is trying to acquire lock: ffff88801f750170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x2ce/0x390 fs/jbd2/transaction.c:905 but task is already holding lock: ffff88805eb5b488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:795 [inline] ffff88805eb5b488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_flush_truncate_log+0x43/0x60 fs/ocfs2/alloc.c:6077 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}: down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:795 [inline] ocfs2_free_cached_clusters fs/ocfs2/alloc.c:6497 [inline] ocfs2_run_deallocs+0xdfc/0x1560 fs/ocfs2/alloc.c:6571 ocfs2_commit_truncate+0x162b/0x1d30 fs/ocfs2/alloc.c:7372 ocfs2_truncate_file+0xd89/0x1540 fs/ocfs2/file.c:526 ocfs2_setattr+0x12f8/0x1b50 fs/ocfs2/file.c:1240 notify_change+0xbc6/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 do_sys_ftruncate+0x31b/0x3d0 fs/open.c:193 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #4 (&oi->ip_alloc_sem){++++}-{3:3}: down_write+0x38/0x60 kernel/locking/rwsem.c:1551 ocfs2_page_mkwrite+0x2c4/0xaa0 fs/ocfs2/mmap.c:141 do_page_mkwrite+0x168/0x3c0 mm/memory.c:2929 do_shared_fault mm/memory.c:4337 [inline] do_fault mm/memory.c:4405 [inline] handle_pte_fault mm/memory.c:4659 [inline] __handle_mm_fault mm/memory.c:4794 [inline] handle_mm_fault+0x1e47/0x4440 mm/memory.c:4892 do_user_addr_fault+0x494/0xc90 arch/x86/mm/fault.c:1355 handle_page_fault arch/x86/mm/fault.c:1443 [inline] exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1496 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 -> #3 (sb_pagefaults#3){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1819 [inline] sb_start_pagefault include/linux/fs.h:1918 [inline] ocfs2_page_mkwrite+0x1a7/0xaa0 fs/ocfs2/mmap.c:121 do_page_mkwrite+0x168/0x3c0 mm/memory.c:2929 do_shared_fault mm/memory.c:4337 [inline] do_fault mm/memory.c:4405 [inline] handle_pte_fault mm/memory.c:4659 [inline] __handle_mm_fault mm/memory.c:4794 [inline] handle_mm_fault+0x1e47/0x4440 mm/memory.c:4892 do_user_addr_fault+0x494/0xc90 arch/x86/mm/fault.c:1355 handle_page_fault arch/x86/mm/fault.c:1443 [inline] exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1496 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 -> #2 (&mm->mmap_lock){++++}-{3:3} : down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 mmap_read_lock+0x1c/0x50 include/linux/mmap_lock.h:117 do_user_addr_fault+0xc3f/0xc90 arch/x86/mm/fault.c:1306 handle_page_fault arch/x86/mm/fault.c:1443 [inline] exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1496 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 __get_user_nocheck_1+0x6/0x10 arch/x86/lib/getuser.S:103 fault_in_readable+0xc5/0x150 mm/gup.c:1801 fault_in_iov_iter_readable+0x128/0x270 lib/iov_iter.c:460 generic_perform_write+0x1a5/0x550 mm/filemap.c:3783 ext4_buffered_write_iter+0x256/0x3a0 fs/ext4/file.c:275 ext4_file_write_iter+0x73f/0x1720 fs/ext4/file.c:-1 call_write_iter include/linux/fs.h:2181 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_write+0x153/0x260 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #1 (&sb->s_type->i_mutex_key#9){++++}-{3:3}: down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 inode_lock_shared include/linux/fs.h:805 [inline] ext4_bmap+0x4f/0x3f0 fs/ext4/inode.c:3167 bmap+0xa2/0xd0 fs/inode.c:1828 jbd2_journal_bmap fs/jbd2/journal.c:981 [inline] jbd2_fc_get_buf+0x17b/0x350 fs/jbd2/journal.c:894 ext4_fc_reserve_space+0x4fa/0x890 fs/ext4/fast_commit.c:705 ext4_fc_add_tlv+0xab/0x570 fs/ext4/fast_commit.c:797 ext4_fc_perform_commit fs/ext4/fast_commit.c:1122 [inline] ext4_fc_commit+0xb08/0x1380 fs/ext4/fast_commit.c:1235 ext4_fsync_journal fs/ext4/fsync.c:115 [inline] ext4_sync_file+0x550/0xb10 fs/ext4/fsync.c:174 generic_write_sync include/linux/fs.h:3003 [inline] ext4_buffered_write_iter+0x32b/0x3a0 fs/ext4/file.c:282 ext4_file_write_iter+0x73f/0x1720 fs/ext4/file.c:-1 do_iter_readv_writev+0x47d/0x5f0 fs/read_write.c:-1 do_iter_write+0x1f8/0x7a0 fs/read_write.c:855 iter_file_splice_write+0x6be/0xcf0 fs/splice.c:690 do_splice_from fs/splice.c:768 [inline] direct_splice_actor+0xe1/0x130 fs/splice.c:957 splice_direct_to_actor+0x4e8/0xc00 fs/splice.c:903 do_splice_direct+0x1d4/0x2f0 fs/splice.c:1009 do_sendfile+0x524/0xe30 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64+0x141/0x1a0 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&journal->j_barrier){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3125 [inline] check_prevs_add kernel/locking/lockdep.c:3244 [inline] validate_chain kernel/locking/lockdep.c:3860 [inline] __lock_acquire+0x39b7/0x7e20 kernel/locking/lockdep.c:5134 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5751 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 jbd2_journal_lock_updates+0x2ce/0x390 fs/jbd2/transaction.c:905 __ocfs2_flush_truncate_log+0x2b4/0x1110 fs/ocfs2/alloc.c:6031 ocfs2_flush_truncate_log+0x4b/0x60 fs/ocfs2/alloc.c:6078 ocfs2_sync_fs+0x119/0x330 fs/ocfs2/super.c:404 sync_filesystem+0x1be/0x220 fs/sync.c:66 generic_shutdown_super+0x6b/0x300 fs/super.c:448 kill_block_super+0x7c/0xe0 fs/super.c:1438 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x426/0x4d0 fs/namespace.c:1148 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:184 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: &journal->j_barrier --> &oi->ip_alloc_sem --> &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6); lock(&oi->ip_alloc_sem); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #6 ); lock(&journal->j_barrier); *** DEADLOCK *** 2 locks held by syz-executor/4191: #0: ffff88807ca0a0e0 (&type->s_umount_key#75){+.+.}-{3:3}, at: deactivate_super+0xa0/0xd0 fs/super.c:365 #1: ffff88805eb5b488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:795 [inline] #1: ffff88805eb5b488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_flush_truncate_log+0x43/0x60 fs/ocfs2/alloc.c:6077 stack backtrace: CPU: 0 PID: 4191 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3125 [inline] check_prevs_add kernel/locking/lockdep.c:3244 [inline] validate_chain kernel/locking/lockdep.c:3860 [inline] __lock_acquire+0x39b7/0x7e20 kernel/locking/lockdep.c:5134 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5751 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 jbd2_journal_lock_updates+0x2ce/0x390 fs/jbd2/transaction.c:905 __ocfs2_flush_truncate_log+0x2b4/0x1110 fs/ocfs2/alloc.c:6031 ocfs2_flush_truncate_log+0x4b/0x60 fs/ocfs2/alloc.c:6078 ocfs2_sync_fs+0x119/0x330 fs/ocfs2/super.c:404 sync_filesystem+0x1be/0x220 fs/sync.c:66 generic_shutdown_super+0x6b/0x300 fs/super.c:448 kill_block_super+0x7c/0xe0 fs/super.c:1438 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x426/0x4d0 fs/namespace.c:1148 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:184 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f71947cb787 Code: a2 c7 05 6c 5f 25 00 00 00 00 00 eb 96 e8 b1 13 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffe1b7925c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f719485951b RCX: 00007f71947cb787 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffe1b792680 RBP: 00007ffe1b792680 R08: 00007ffe1b793680 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe1b793710 R13: 00007f719485951b R14: 000000000001af72 R15: 00007ffe1b793750 kernfs filecheck: removing kobject: 'filecheck' (ffff88807c3bd430): kobject_cleanup, parent 0000000000000000 kobject: 'filecheck' (ffff88807c3bd430): calling ktype release kobject: 'filecheck': free name kernfs loop2: removing kobject: 'loop2' (ffff888024d80b50): kobject_cleanup, parent 0000000000000000 kobject: 'loop2' (ffff888024d80b50): calling ktype release kobject: 'loop2' (ffff888024d80b50): 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' (ffff888017c96a00): kobject_uevent_env kobject: 'loop2' (ffff888017c96a00): fill_kobj_path: path = '/devices/virtual/block/loop2' kobject: 'loop2' (ffff888017c96a00): kobject_uevent_env kobject: 'loop2' (ffff888017c96a00): fill_kobj_path: path = '/devices/virtual/block/loop2' ffff888078868000 name hci1 bus 0 hci1 ffff888078868000 hci1: err 0x13 hci1: cancelling interleave scan hci1 state 0 -> 0 All LE pending actions cleared hdev hci1 hcon ffff88807b8d8000 reason 22 hcon ffff88807b8d8000 conn ffff88807b899800, err 103 hci1 hcon ffff88807b8d8000 chan ffff8881473f2c00 hci1 hcon ffff88807b8d8000 handle 201 hcon ffff88807b8d8000 hci1: conn ffff88807b8d8000 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' (ffff88807b8d8420): kobject_uevent_env kobject: 'hci1:201' (ffff88807b8d8420): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/hci1:201' kernfs hci1:201: removing kobject: 'hci1:201' (ffff88807b8d8420): kobject_cleanup, parent 0000000000000000 kobject: 'hci1:201' (ffff88807b8d8420): calling ktype release kobject: 'hci1:201': free name hci1 orig refcnt 10 hcon ffff88807b892000 reason 22 hcon ffff88807b892000 conn ffff88807b899000, err 103 hci1 hcon ffff88807b892000 chan ffff8881473f2d00 hci1 hcon ffff88807b892000 handle 200 hcon ffff88807b892000 hci1: conn ffff88807b892000 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' (ffff88807b892420): kobject_uevent_env kobject: 'hci1:200' (ffff88807b892420): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/hci1:200' kernfs hci1:200: removing kobject: 'hci1:200' (ffff88807b892420): kobject_cleanup, parent 0000000000000000 kobject: 'hci1:200' (ffff88807b892420): calling ktype release kobject: 'hci1:200': free name hci1 orig refcnt 7 hdev hci1 event 4 hdev 0000000000000000 len 8 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 rfkill6: 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:rfkill6 kobject: 'rfkill6' (ffff888147aba108): kobject_uevent_env kobject: 'rfkill6' (ffff888147aba108): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1/rfkill6' kernfs rfkill6: removing kobject: 'rfkill6' (ffff888147aba108): kobject_cleanup, parent 0000000000000000 kobject: 'rfkill6' (ffff888147aba108): calling ktype release kobject: 'rfkill6': 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' (ffff888078869748): kobject_uevent_env kobject: 'hci1' (ffff888078869748): fill_kobj_path: path = '/devices/virtual/bluetooth/hci1' kernfs hci1: removing hci1 orig refcnt 2 kobject: 'hci1' (ffff888078869748): kobject_cleanup, parent 0000000000000000 kobject: 'hci1' (ffff888078869748): calling ktype release All LE connection parameters were removed kobject: 'hci1': free name syz_tun: bond_netdev_event received NETDEV_GOING_DOWN net syz_tun: siw: event 10 In tnode_resize ffff8880749b5420 inflate_threshold=50 threshold=25 In tnode_resize ffff88805f298420 inflate_threshold=50 threshold=25 In tnode_resize ffff88805f4e4c20 inflate_threshold=50 threshold=25 In tnode_resize ffff888021f7ff20 inflate_threshold=50 threshold=25 In tnode_resize ffff888024eba8a0 inflate_threshold=50 threshold=25 In tnode_resize ffff8880752418a0 inflate_threshold=50 threshold=25 In tnode_resize ffff888075241a20 inflate_threshold=50 threshold=25 trie_flush found=1 In tnode_resize ffff8880749b5420 inflate_threshold=50 threshold=25 In tnode_resize ffff88805f298420 inflate_threshold=50 threshold=25 In tnode_resize ffff88805f4e4c20 inflate_threshold=50 threshold=25 In tnode_resize ffff888021f7ff20 inflate_threshold=50 threshold=25 In tnode_resize ffff888024eba8a0 inflate_threshold=50 threshold=25 In tnode_resize ffff8880752418a0 inflate_threshold=50 threshold=25 In tnode_resize ffff888075241a20 inflate_threshold=50 threshold=25 trie_flush found=1 syz_tun: bond_netdev_event received NETDEV_DOWN net syz_tun: siw: event 2 sctp: sctp_addr_wq_mgmt: add new entry for cmd:2, addr:fe80::a8aa:aaff:feaa:aaaa in wq:ffff8880768b8cd8 sctp: sctp_addr_wq_mgmt: add new entry for cmd:2, addr:fe80::aa in wq:ffff8880768b8cd8