Hello,
syzbot found the following issue on:
HEAD commit: 91d48252ad4b Linux 5.15.202
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=15bfddaa580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=353ae28c40b35af5
dashboard link:
https://syzkaller.appspot.com/bug?extid=70792f487c3a1ab4a993
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/74e75dfcb812/disk-91d48252.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/bfa72aab00f2/vmlinux-91d48252.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/47ea72d1c7dc/bzImage-91d48252.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+70792f...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.2.1627/13661 is trying to acquire lock:
ffff88807e96ab28 (&mm->mmap_lock){++++}-{3:3}, at: __might_fault+0x90/0x110 mm/memory.c:5356
but task is already holding lock:
ffff88802a317090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&sbi->lock){+.+.}-{3:3}:
__mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27
reiserfs_get_block+0x2a8/0x42a0 fs/reiserfs/inode.c:688
do_mpage_readpage+0x83a/0x1e50 fs/mpage.c:231
mpage_readahead+0x3ef/0x920 fs/mpage.c:389
read_pages+0x175/0x930 mm/readahead.c:130
page_cache_ra_unbounded+0x838/0x940 mm/readahead.c:239
page_cache_async_readahead include/linux/pagemap.h:856 [inline]
do_async_mmap_readahead mm/filemap.c:3023 [inline]
filemap_fault+0x5fa/0x1370 mm/filemap.c:3079
__do_fault+0x141/0x330 mm/memory.c:3928
do_shared_fault mm/memory.c:4318 [inline]
do_fault mm/memory.c:4396 [inline]
handle_pte_fault mm/memory.c:4650 [inline]
__handle_mm_fault mm/memory.c:4785 [inline]
handle_mm_fault+0x1d19/0x4410 mm/memory.c:4883
faultin_page mm/gup.c:976 [inline]
__get_user_pages+0x94b/0x11e0 mm/gup.c:1197
faultin_vma_page_range+0x1e0/0x260 mm/gup.c:1590
madvise_populate mm/madvise.c:856 [inline]
madvise_vma mm/madvise.c:1004 [inline]
do_madvise+0xa46/0x2c90 mm/madvise.c:1207
__do_sys_madvise mm/madvise.c:1233 [inline]
__se_sys_madvise mm/madvise.c:1231 [inline]
__x64_sys_madvise+0xa2/0xb0 mm/madvise.c:1231
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 (mapping.invalidate_lock#5){.+.+}-{3:3}:
down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498
filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
filemap_fault+0x699/0x1370 mm/filemap.c:3081
__do_fault+0x141/0x330 mm/memory.c:3928
do_shared_fault mm/memory.c:4318 [inline]
do_fault mm/memory.c:4396 [inline]
handle_pte_fault mm/memory.c:4650 [inline]
__handle_mm_fault mm/memory.c:4785 [inline]
handle_mm_fault+0x1d19/0x4410 mm/memory.c:4883
faultin_page mm/gup.c:976 [inline]
__get_user_pages+0x94b/0x11e0 mm/gup.c:1197
faultin_vma_page_range+0x1e0/0x260 mm/gup.c:1590
madvise_populate mm/madvise.c:856 [inline]
madvise_vma mm/madvise.c:1004 [inline]
do_madvise+0xa46/0x2c90 mm/madvise.c:1207
__do_sys_madvise mm/madvise.c:1233 [inline]
__se_sys_madvise mm/madvise.c:1231 [inline]
__x64_sys_madvise+0xa2/0xb0 mm/madvise.c:1231
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 (&mm->mmap_lock){++++}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
__might_fault+0xb3/0x110 mm/memory.c:5357
reiserfs_ioctl+0x13b/0x330 fs/reiserfs/ioctl.c:96
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
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
other info that might help us debug this:
Chain exists of:
&mm->mmap_lock --> mapping.invalidate_lock#5 --> &sbi->lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&sbi->lock);
lock(mapping.invalidate_lock#5);
lock(&sbi->lock);
lock(&mm->mmap_lock);
*** DEADLOCK ***
1 lock held by syz.2.1627/13661:
#0: ffff88802a317090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27
stack backtrace:
CPU: 0 PID: 13661 Comm: syz.2.1627 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
__might_fault+0xb3/0x110 mm/memory.c:5357
reiserfs_ioctl+0x13b/0x330 fs/reiserfs/ioctl.c:96
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
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
RIP: 0033:0x7f5f7a58e799
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5f787e8028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f5f7a807fa0 RCX: 00007f5f7a58e799
RDX: 0000200000000000 RSI: 0000000080087601 RDI: 0000000000000005
RBP: 00007f5f7a624bd9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5f7a808038 R14: 00007f5f7a807fa0 R15: 00007ffe9cefe378
</TASK>
---
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