ocfs2: Slot 0 on device (7,4) was already allocated to this node! ocfs2: Mounting device (7,4) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc7-syzkaller-g82af5ea7c611 #0 Not tainted ------------------------------------------------------ syz.4.100/7217 is trying to acquire lock: ffff0000f6640660 (&oi->ip_alloc_sem){++++}-{4:4}, at: ocfs2_page_mkwrite+0x340/0xbf4 fs/ocfs2/mmap.c:142 but task is already holding lock: ffff0000da692520 (sb_pagefaults#3){.+.+}-{0:0}, at: do_page_mkwrite+0x138/0x2b8 mm/memory.c:3378 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sb_pagefaults#3){.+.+}-{0:0}: percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline] __sb_start_write include/linux/fs.h:1795 [inline] sb_start_pagefault include/linux/fs.h:1960 [inline] ocfs2_page_mkwrite+0x1b0/0xbf4 fs/ocfs2/mmap.c:122 do_page_mkwrite+0x138/0x2b8 mm/memory.c:3378 wp_page_shared mm/memory.c:3779 [inline] do_wp_page+0x1d34/0x4160 mm/memory.c:3998 handle_pte_fault mm/memory.c:6085 [inline] __handle_mm_fault mm/memory.c:6212 [inline] handle_mm_fault+0x10d4/0x4d38 mm/memory.c:6381 do_page_fault+0x57c/0x13cc arch/arm64/mm/fault.c:696 do_mem_abort+0x70/0x194 arch/arm64/mm/fault.c:929 el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:481 el1h_64_sync_handler+0x50/0xfc arch/arm64/kernel/entry-common.c:597 el1h_64_sync+0x6c/0x70 arch/arm64/kernel/entry.S:591 __uaccess_mask_ptr arch/arm64/include/asm/uaccess.h:169 [inline] __sys_socketpair+0x14c/0x62c net/socket.c:1733 __do_sys_socketpair net/socket.c:1799 [inline] __se_sys_socketpair net/socket.c:1796 [inline] __arm64_sys_socketpair+0x9c/0xb8 net/socket.c:1796 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 -> #1 (&mm->mmap_lock){++++}-{4:4}: __might_fault+0xc4/0x124 mm/memory.c:6971 _inline_copy_to_user include/linux/uaccess.h:192 [inline] copy_to_user include/linux/uaccess.h:223 [inline] fiemap_fill_next_extent+0x17c/0x3f0 fs/ioctl.c:145 ocfs2_fiemap+0x648/0x9c4 fs/ocfs2/extent_map.c:806 ioctl_fiemap fs/ioctl.c:220 [inline] do_vfs_ioctl+0x1560/0x1cd8 fs/ioctl.c:841 __do_sys_ioctl fs/ioctl.c:905 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __arm64_sys_ioctl+0xe4/0x1c4 fs/ioctl.c:893 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 -> #0 (&oi->ip_alloc_sem){++++}-{4:4}: check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain kernel/locking/lockdep.c:3911 [inline] __lock_acquire+0x1774/0x30a4 kernel/locking/lockdep.c:5240 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5871 down_write+0x50/0xc0 kernel/locking/rwsem.c:1577 ocfs2_page_mkwrite+0x340/0xbf4 fs/ocfs2/mmap.c:142 do_page_mkwrite+0x138/0x2b8 mm/memory.c:3378 wp_page_shared mm/memory.c:3779 [inline] do_wp_page+0x1d34/0x4160 mm/memory.c:3998 handle_pte_fault mm/memory.c:6085 [inline] __handle_mm_fault mm/memory.c:6212 [inline] handle_mm_fault+0x10d4/0x4d38 mm/memory.c:6381 do_page_fault+0x57c/0x13cc arch/arm64/mm/fault.c:696 do_mem_abort+0x70/0x194 arch/arm64/mm/fault.c:929 el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:481 el1h_64_sync_handler+0x50/0xfc arch/arm64/kernel/entry-common.c:597 el1h_64_sync+0x6c/0x70 arch/arm64/kernel/entry.S:591 __uaccess_mask_ptr arch/arm64/include/asm/uaccess.h:169 [inline] __sys_socketpair+0x14c/0x62c net/socket.c:1733 __do_sys_socketpair net/socket.c:1799 [inline] __se_sys_socketpair net/socket.c:1796 [inline] __arm64_sys_socketpair+0x9c/0xb8 net/socket.c:1796 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 other info that might help us debug this: Chain exists of: &oi->ip_alloc_sem --> &mm->mmap_lock --> sb_pagefaults#3 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(sb_pagefaults#3); lock(&mm->mmap_lock); lock(sb_pagefaults#3); lock(&oi->ip_alloc_sem); *** DEADLOCK *** 2 locks held by syz.4.100/7217: #0: ffff0000d06812d0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_trylock include/linux/mmap_lock.h:431 [inline] #0: ffff0000d06812d0 (&mm->mmap_lock){++++}-{4:4}, at: get_mmap_lock_carefully mm/mmap_lock.c:188 [inline] #0: ffff0000d06812d0 (&mm->mmap_lock){++++}-{4:4}, at: lock_mm_and_find_vma+0x38/0x2d8 mm/mmap_lock.c:248 #1: ffff0000da692520 (sb_pagefaults#3){.+.+}-{0:0}, at: do_page_mkwrite+0x138/0x2b8 mm/memory.c:3378 stack backtrace: CPU: 1 UID: 0 PID: 7217 Comm: syz.4.100 Not tainted 6.16.0-rc7-syzkaller-g82af5ea7c611 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/18/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x324/0x32c kernel/locking/lockdep.c:2046 check_noncircular+0x154/0x174 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain kernel/locking/lockdep.c:3911 [inline] __lock_acquire+0x1774/0x30a4 kernel/locking/lockdep.c:5240 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5871 down_write+0x50/0xc0 kernel/locking/rwsem.c:1577 ocfs2_page_mkwrite+0x340/0xbf4 fs/ocfs2/mmap.c:142 do_page_mkwrite+0x138/0x2b8 mm/memory.c:3378 wp_page_shared mm/memory.c:3779 [inline] do_wp_page+0x1d34/0x4160 mm/memory.c:3998 handle_pte_fault mm/memory.c:6085 [inline] __handle_mm_fault mm/memory.c:6212 [inline] handle_mm_fault+0x10d4/0x4d38 mm/memory.c:6381 do_page_fault+0x57c/0x13cc arch/arm64/mm/fault.c:696 do_mem_abort+0x70/0x194 arch/arm64/mm/fault.c:929 el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:481 el1h_64_sync_handler+0x50/0xfc arch/arm64/kernel/entry-common.c:597 el1h_64_sync+0x6c/0x70 arch/arm64/kernel/entry.S:591 __uaccess_mask_ptr arch/arm64/include/asm/uaccess.h:169 [inline] (P) __sys_socketpair+0x14c/0x62c net/socket.c:1733 (P) __do_sys_socketpair net/socket.c:1799 [inline] __se_sys_socketpair net/socket.c:1796 [inline] __arm64_sys_socketpair+0x9c/0xb8 net/socket.c:1796 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 trusted_key: encrypted_key: keylen for the ecryptfs format must be equal to 64 bytes