====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/6883 is trying to acquire lock: ffff8880786aa170 (&journal->j_barrier ){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x2ce/0x390 fs/jbd2/transaction.c:905 but task is already holding lock: ffff888047925108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #8){+.+.}-{3:3} , at: inode_lock include/linux/fs.h:795 [inline] , 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]#8){+.+.}-{3:3}: down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:795 [inline] ocfs2_remove_btree_range+0x64f/0x15e0 fs/ocfs2/alloc.c:5746 ocfs2_remove_inode_range+0xf4a/0x2610 fs/ocfs2/file.c:1935 __ocfs2_change_file_space+0x853/0xf60 fs/ocfs2/file.c:2056 ocfs2_fallocate+0x1ee/0x240 fs/ocfs2/file.c:2166 vfs_fallocate+0x57e/0x6f0 fs/open.c:308 madvise_remove mm/madvise.c:935 [inline] madvise_vma mm/madvise.c:999 [inline] do_madvise+0xf1f/0x2aa0 mm/madvise.c:1214 __do_sys_madvise mm/madvise.c:1240 [inline] __se_sys_madvise mm/madvise.c:1238 [inline] __x64_sys_madvise+0xa2/0xb0 mm/madvise.c:1238 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 wp_page_shared+0x163/0x6c0 mm/memory.c:3268 handle_pte_fault mm/memory.c:4677 [inline] __handle_mm_fault mm/memory.c:4794 [inline] handle_mm_fault+0x1fbd/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 copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:205 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline] copyout lib/iov_iter.c:157 [inline] copy_page_to_iter_iovec lib/iov_iter.c:228 [inline] __copy_page_to_iter lib/iov_iter.c:861 [inline] copy_page_to_iter+0x4c9/0x930 lib/iov_iter.c:889 filemap_read+0x1e0a/0x2560 mm/filemap.c:2714 ocfs2_file_read_iter+0x288/0xab0 fs/ocfs2/file.c:2622 call_read_iter include/linux/fs.h:2175 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x75e/0xd50 fs/read_write.c:485 ksys_read+0x153/0x260 fs/read_write.c:623 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 -> #3 ( sb_pagefaults#6){.+.+}-{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 wp_page_shared+0x163/0x6c0 mm/memory.c:3268 handle_pte_fault mm/memory.c:4677 [inline] __handle_mm_fault mm/memory.c:4794 [inline] handle_mm_fault+0x1fbd/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 copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:205 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline] copyout lib/iov_iter.c:157 [inline] copy_page_to_iter_iovec lib/iov_iter.c:228 [inline] __copy_page_to_iter lib/iov_iter.c:861 [inline] copy_page_to_iter+0x4c9/0x930 lib/iov_iter.c:889 filemap_read+0x1e0a/0x2560 mm/filemap.c:2714 ocfs2_file_read_iter+0x288/0xab0 fs/ocfs2/file.c:2622 call_read_iter include/linux/fs.h:2175 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x75e/0xd50 fs/read_write.c:485 ksys_read+0x153/0x260 fs/read_write.c:623 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 -> #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 call_write_iter include/linux/fs.h:2181 [inline] aio_write+0x54a/0x780 fs/aio.c:1605 __io_submit_one fs/aio.c:-1 [inline] io_submit_one+0x6d2/0x1310 fs/aio.c:2029 __do_sys_io_submit fs/aio.c:2088 [inline] __se_sys_io_submit+0x19d/0x310 fs/aio.c:2058 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]#8 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #8); lock(&oi->ip_alloc_sem); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8); lock(&journal->j_barrier); *** DEADLOCK *** 2 locks held by syz-executor/6883: #0: ffff88806142c0e0 (&type->s_umount_key#104){++++}-{3:3}, at: deactivate_super+0xa0/0xd0 fs/super.c:365 #1: ffff888047925108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:795 [inline] #1: ffff888047925108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8){+.+.}-{3:3}, at: ocfs2_flush_truncate_log+0x43/0x60 fs/ocfs2/alloc.c:6077 stack backtrace: CPU: 0 PID: 6883 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:0x7fe929055dc7 Code: a2 c7 05 2c 69 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:00007ffc932d61d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007fe9290e455b RCX: 00007fe929055dc7 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffc932d6290 RBP: 00007ffc932d6290 R08: 00007ffc932d7290 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc932d7320 R13: 00007fe9290e455b R14: 0000000000052a75 R15: 00007ffc932d7360 kernfs filecheck: removing kobject: 'filecheck' (ffff888063fbd430): kobject_cleanup, parent 0000000000000000 kobject: 'filecheck' (ffff888063fbd430): calling ktype release kobject: 'filecheck': free name kernfs loop6: removing kobject: 'loop6' (ffff8880677b7050): kobject_cleanup, parent 0000000000000000 kobject: 'loop6' (ffff8880677b7050): calling ktype release kobject: 'loop6' (ffff8880677b7050): kset_release kobject: 'loop6': free name ocfs2: Unmounting device (7,6) 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: 'loop6' (ffff88801e6d2380): kobject_uevent_env kobject: 'loop6' (ffff88801e6d2380): fill_kobj_path: path = '/devices/virtual/block/loop6' kobject: 'loop6' (ffff88801e6d2380): kobject_uevent_env kobject: 'loop6' (ffff88801e6d2380): fill_kobj_path: path = '/devices/virtual/block/loop6' ffff88806253c000 name hci4 bus 0 hci4 ffff88806253c000 hci4: err 0x13 hci4: cancelling interleave scan hci4 state 0 -> 0 All LE pending actions cleared hdev hci4 hcon ffff888018bda000 reason 22 hcon ffff888018bda000 conn ffff888028038800, err 103 hci4 hcon ffff888018bda000 chan ffff88801ff83000 hci4 hcon ffff888018bda000 handle 201 hcon ffff888018bda000 hci4: conn ffff888018bda000 device: 'hci4: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