Hello,
syzbot found the following issue on:
HEAD commit: 2fe2b96c3818 arm64/fpsimd: signal: Simplify preserve_tpidr..
git tree: git://
git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output:
https://syzkaller.appspot.com/x/log.txt?x=13be3398580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=cd7cb758c9c7b24c
dashboard link:
https://syzkaller.appspot.com/bug?extid=dada432f42ae8bce1250
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
CC: [
ak...@linux-foundation.org linux-...@vger.kernel.org linux-...@vger.kernel.org linu...@kvack.org wi...@infradead.org]
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/275d012114cb/disk-2fe2b96c.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/6a9e6cb61fac/vmlinux-2fe2b96c.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/4704d50c6a4f/Image-2fe2b96c.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+dada43...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
6.15.0-rc1-syzkaller-g2fe2b96c3818 #0 Not tainted
------------------------------------------------------
syz.1.367/8496 is trying to acquire lock:
ffff0000dde499a0 (mapping.invalidate_lock#7){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:922 [inline]
ffff0000dde499a0 (mapping.invalidate_lock#7){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x100/0x758 mm/readahead.c:228
but task is already holding lock:
ffff0000d4fc23d0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock_killable include/linux/mmap_lock.h:193 [inline]
ffff0000d4fc23d0 (&mm->mmap_lock){++++}-{4:4}, at: __get_user_pages_locked mm/gup.c:1812 [inline]
ffff0000d4fc23d0 (&mm->mmap_lock){++++}-{4:4}, at: faultin_page_range+0x33c/0x778 mm/gup.c:1981
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&mm->mmap_lock){++++}-{4:4}:
__might_fault+0xc4/0x124 mm/memory.c:7151
_inline_copy_to_user include/linux/uaccess.h:192 [inline]
copy_to_user include/linux/uaccess.h:223 [inline]
fiemap_fill_next_extent+0x1d0/0x45c fs/ioctl.c:145
ocfs2_fiemap+0x894/0xe04 fs/ocfs2/extent_map.c:806
ioctl_fiemap fs/ioctl.c:220 [inline]
do_vfs_ioctl+0x1b14/0x26f4 fs/ioctl.c:840
__do_sys_ioctl fs/ioctl.c:904 [inline]
__se_sys_ioctl fs/ioctl.c:892 [inline]
__arm64_sys_ioctl+0xe4/0x1c4 fs/ioctl.c:892
__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+0x54/0x168 arch/arm64/kernel/entry-common.c:744
el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762
el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600
-> #1 (&ocfs2_file_ip_alloc_sem_key){++++}-{4:4}:
down_read+0x58/0x2fc kernel/locking/rwsem.c:1524
ocfs2_read_folio+0x328/0x970 fs/ocfs2/aops.c:287
filemap_read_folio+0x108/0x318 mm/filemap.c:2400
filemap_fault+0xe24/0x1364 mm/filemap.c:3494
ocfs2_fault+0xbc/0x494 fs/ocfs2/mmap.c:38
__do_fault+0xf8/0x498 mm/memory.c:5098
do_shared_fault mm/memory.c:5582 [inline]
do_fault mm/memory.c:5656 [inline]
do_pte_missing mm/memory.c:4160 [inline]
handle_pte_fault+0x1320/0x5c94 mm/memory.c:5997
__handle_mm_fault mm/memory.c:6140 [inline]
handle_mm_fault+0xf18/0x17bc mm/memory.c:6309
faultin_page mm/gup.c:1193 [inline]
__get_user_pages+0x187c/0x3408 mm/gup.c:1491
__get_user_pages_locked mm/gup.c:1757 [inline]
faultin_page_range+0x200/0x778 mm/gup.c:1981
madvise_populate mm/madvise.c:965 [inline]
madvise_do_behavior+0x4bc/0x2fc0 mm/madvise.c:1693
do_madvise mm/madvise.c:1782 [inline]
__do_sys_madvise mm/madvise.c:1790 [inline]
__se_sys_madvise mm/madvise.c:1788 [inline]
__arm64_sys_madvise+0x164/0x1f8 mm/madvise.c:1788
__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+0x54/0x168 arch/arm64/kernel/entry-common.c:744
el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762
el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600
-> #0 (mapping.invalidate_lock#7){.+.+}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3166 [inline]
check_prevs_add kernel/locking/lockdep.c:3285 [inline]
validate_chain kernel/locking/lockdep.c:3909 [inline]
__lock_acquire+0x17b8/0x32c4 kernel/locking/lockdep.c:5235
lock_acquire+0x150/0x2e8 kernel/locking/lockdep.c:5866
down_read+0x58/0x2fc kernel/locking/rwsem.c:1524
filemap_invalidate_lock_shared include/linux/fs.h:922 [inline]
page_cache_ra_unbounded+0x100/0x758 mm/readahead.c:228
do_page_cache_ra mm/readahead.c:327 [inline]
page_cache_ra_order+0x960/0xb8c mm/readahead.c:532
do_sync_mmap_readahead+0x3a8/0x834 mm/filemap.c:-1
filemap_fault+0x68c/0x1364 mm/filemap.c:3402
ocfs2_fault+0xbc/0x494 fs/ocfs2/mmap.c:38
__do_fault+0xf8/0x498 mm/memory.c:5098
do_shared_fault mm/memory.c:5582 [inline]
do_fault mm/memory.c:5656 [inline]
do_pte_missing mm/memory.c:4160 [inline]
handle_pte_fault+0x1320/0x5c94 mm/memory.c:5997
__handle_mm_fault mm/memory.c:6140 [inline]
handle_mm_fault+0xf18/0x17bc mm/memory.c:6309
faultin_page mm/gup.c:1193 [inline]
__get_user_pages+0x187c/0x3408 mm/gup.c:1491
__get_user_pages_locked mm/gup.c:1821 [inline]
faultin_page_range+0x384/0x778 mm/gup.c:1981
madvise_populate mm/madvise.c:965 [inline]
madvise_do_behavior+0x4bc/0x2fc0 mm/madvise.c:1693
do_madvise mm/madvise.c:1782 [inline]
__do_sys_madvise mm/madvise.c:1790 [inline]
__se_sys_madvise mm/madvise.c:1788 [inline]
__arm64_sys_madvise+0x164/0x1f8 mm/madvise.c:1788
__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+0x54/0x168 arch/arm64/kernel/entry-common.c:744
el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762
el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600
other info that might help us debug this:
Chain exists of:
mapping.invalidate_lock#7 --> &ocfs2_file_ip_alloc_sem_key --> &mm->mmap_lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
rlock(&mm->mmap_lock);
lock(&ocfs2_file_ip_alloc_sem_key);
lock(&mm->mmap_lock);
rlock(mapping.invalidate_lock#7);
*** DEADLOCK ***
1 lock held by syz.1.367/8496:
#0: ffff0000d4fc23d0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock_killable include/linux/mmap_lock.h:193 [inline]
#0: ffff0000d4fc23d0 (&mm->mmap_lock){++++}-{4:4}, at: __get_user_pages_locked mm/gup.c:1812 [inline]
#0: ffff0000d4fc23d0 (&mm->mmap_lock){++++}-{4:4}, at: faultin_page_range+0x33c/0x778 mm/gup.c:1981
stack backtrace:
CPU: 1 UID: 0 PID: 8496 Comm: syz.1.367 Not tainted 6.15.0-rc1-syzkaller-g2fe2b96c3818 #0 PREEMPT
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call trace:
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C)
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120
dump_stack+0x1c/0x28 lib/dump_stack.c:129
print_circular_bug+0x32c/0x334 kernel/locking/lockdep.c:2079
check_noncircular+0x15c/0x178 kernel/locking/lockdep.c:2211
check_prev_add kernel/locking/lockdep.c:3166 [inline]
check_prevs_add kernel/locking/lockdep.c:3285 [inline]
validate_chain kernel/locking/lockdep.c:3909 [inline]
__lock_acquire+0x17b8/0x32c4 kernel/locking/lockdep.c:5235
lock_acquire+0x150/0x2e8 kernel/locking/lockdep.c:5866
down_read+0x58/0x2fc kernel/locking/rwsem.c:1524
filemap_invalidate_lock_shared include/linux/fs.h:922 [inline]
page_cache_ra_unbounded+0x100/0x758 mm/readahead.c:228
do_page_cache_ra mm/readahead.c:327 [inline]
page_cache_ra_order+0x960/0xb8c mm/readahead.c:532
do_sync_mmap_readahead+0x3a8/0x834 mm/filemap.c:-1
filemap_fault+0x68c/0x1364 mm/filemap.c:3402
ocfs2_fault+0xbc/0x494 fs/ocfs2/mmap.c:38
__do_fault+0xf8/0x498 mm/memory.c:5098
do_shared_fault mm/memory.c:5582 [inline]
do_fault mm/memory.c:5656 [inline]
do_pte_missing mm/memory.c:4160 [inline]
handle_pte_fault+0x1320/0x5c94 mm/memory.c:5997
__handle_mm_fault mm/memory.c:6140 [inline]
handle_mm_fault+0xf18/0x17bc mm/memory.c:6309
faultin_page mm/gup.c:1193 [inline]
__get_user_pages+0x187c/0x3408 mm/gup.c:1491
__get_user_pages_locked mm/gup.c:1821 [inline]
faultin_page_range+0x384/0x778 mm/gup.c:1981
madvise_populate mm/madvise.c:965 [inline]
madvise_do_behavior+0x4bc/0x2fc0 mm/madvise.c:1693
do_madvise mm/madvise.c:1782 [inline]
__do_sys_madvise mm/madvise.c:1790 [inline]
__se_sys_madvise mm/madvise.c:1788 [inline]
__arm64_sys_madvise+0x164/0x1f8 mm/madvise.c:1788
__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+0x54/0x168 arch/arm64/kernel/entry-common.c:744
el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762
el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600
---
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