Hello,
syzbot found the following issue on:
HEAD commit: 58485ff1a74f Linux 6.1.141
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=12950b70580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=d93c21c25e641edc
dashboard link:
https://syzkaller.appspot.com/bug?extid=0447b9919b8379831849
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/13b062afcec7/disk-58485ff1.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/fdd4e489be2a/vmlinux-58485ff1.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/08bebb6045ec/Image-58485ff1.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+0447b9...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
6.1.141-syzkaller #0 Not tainted
------------------------------------------------------
syz.4.420/5740 is trying to acquire lock:
ffff0000f637ea20 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_page_mkwrite+0x328/0xbf4 fs/ocfs2/mmap.c:142
but task is already holding lock:
ffff0000f7eba558 (sb_pagefaults#3){.+.+}-{0:0}, at: do_page_mkwrite+0x13c/0x358 mm/memory.c:3011
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 include/linux/percpu-rwsem.h:51 [inline]
__sb_start_write include/linux/fs.h:1891 [inline]
sb_start_pagefault include/linux/fs.h:1995 [inline]
ocfs2_page_mkwrite+0x194/0xbf4 fs/ocfs2/mmap.c:122
do_page_mkwrite+0x13c/0x358 mm/memory.c:3011
wp_page_shared+0x148/0x550 mm/memory.c:3360
do_wp_page+0xca0/0xef0 mm/memory.c:3510
handle_pte_fault mm/memory.c:5049 [inline]
__handle_mm_fault mm/memory.c:5173 [inline]
handle_mm_fault+0x133c/0x2fd4 mm/memory.c:5294
__do_page_fault arch/arm64/mm/fault.c:499 [inline]
do_page_fault+0x310/0x99c arch/arm64/mm/fault.c:583
do_mem_abort+0x70/0x194 arch/arm64/mm/fault.c:803
el0_da+0x70/0x154 arch/arm64/kernel/entry-common.c:515
el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
-> #1 (&mm->mmap_lock){++++}-{3:3}:
__might_fault+0xc4/0x124 mm/memory.c:5852
_copy_to_user include/linux/uaccess.h:143 [inline]
copy_to_user include/linux/uaccess.h:169 [inline]
fiemap_fill_next_extent+0x15c/0x3b4 fs/ioctl.c:144
ocfs2_fiemap_inline fs/ocfs2/extent_map.c:725 [inline]
ocfs2_fiemap+0x75c/0x9b0 fs/ocfs2/extent_map.c:762
ioctl_fiemap fs/ioctl.c:219 [inline]
do_vfs_ioctl+0x1694/0x206c fs/ioctl.c:810
__do_sys_ioctl fs/ioctl.c:868 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0xe4/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
-> #0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain kernel/locking/lockdep.c:3825 [inline]
__lock_acquire+0x293c/0x6544 kernel/locking/lockdep.c:5049
lock_acquire+0x20c/0x644 kernel/locking/lockdep.c:5662
down_write+0x5c/0x88 kernel/locking/rwsem.c:1573
ocfs2_page_mkwrite+0x328/0xbf4 fs/ocfs2/mmap.c:142
do_page_mkwrite+0x13c/0x358 mm/memory.c:3011
wp_page_shared+0x148/0x550 mm/memory.c:3360
do_wp_page+0xca0/0xef0 mm/memory.c:3510
handle_pte_fault mm/memory.c:5049 [inline]
__handle_mm_fault mm/memory.c:5173 [inline]
handle_mm_fault+0x133c/0x2fd4 mm/memory.c:5294
__do_page_fault arch/arm64/mm/fault.c:499 [inline]
do_page_fault+0x310/0x99c arch/arm64/mm/fault.c:583
do_mem_abort+0x70/0x194 arch/arm64/mm/fault.c:803
el0_da+0x70/0x154 arch/arm64/kernel/entry-common.c:515
el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
other info that might help us debug this:
Chain exists of:
&ocfs2_file_ip_alloc_sem_key --> &mm->mmap_lock --> sb_pagefaults#3
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(sb_pagefaults#3);
lock(&mm->mmap_lock);
lock(sb_pagefaults#3);
lock(&ocfs2_file_ip_alloc_sem_key);
*** DEADLOCK ***
2 locks held by syz.4.420/5740:
#0: ffff0000ca465548 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline]
#0: ffff0000ca465548 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5322 [inline]
#0: ffff0000ca465548 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x38/0x2e8 mm/memory.c:5384
#1: ffff0000f7eba558 (sb_pagefaults#3){.+.+}-{0:0}, at: do_page_mkwrite+0x13c/0x358 mm/memory.c:3011
stack backtrace:
CPU: 1 PID: 5740 Comm: syz.4.420 Not tainted 6.1.141-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048
check_noncircular+0x240/0x2d4 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain kernel/locking/lockdep.c:3825 [inline]
__lock_acquire+0x293c/0x6544 kernel/locking/lockdep.c:5049
lock_acquire+0x20c/0x644 kernel/locking/lockdep.c:5662
down_write+0x5c/0x88 kernel/locking/rwsem.c:1573
ocfs2_page_mkwrite+0x328/0xbf4 fs/ocfs2/mmap.c:142
do_page_mkwrite+0x13c/0x358 mm/memory.c:3011
wp_page_shared+0x148/0x550 mm/memory.c:3360
do_wp_page+0xca0/0xef0 mm/memory.c:3510
handle_pte_fault mm/memory.c:5049 [inline]
__handle_mm_fault mm/memory.c:5173 [inline]
handle_mm_fault+0x133c/0x2fd4 mm/memory.c:5294
__do_page_fault arch/arm64/mm/fault.c:499 [inline]
do_page_fault+0x310/0x99c arch/arm64/mm/fault.c:583
do_mem_abort+0x70/0x194 arch/arm64/mm/fault.c:803
el0_da+0x70/0x154 arch/arm64/kernel/entry-common.c:515
el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup