[v5.15] possible deadlock in reiserfs_writepage (3)

0 views
Skip to first unread message

syzbot

unread,
Jun 25, 2026, 7:10:31 AM (22 hours ago) Jun 25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: eceeec79dbc6 Linux 5.15.210
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15d81276580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6a0cae3abafc69
dashboard link: https://syzkaller.appspot.com/bug?extid=e6718541ff68970699ee
compiler: Debian clang version 22.1.6 (++20260514074242+fc4aad7b5db3-1~exp1~20260514074407.73), Debian LLD 22.1.6

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a8f82a67235a/disk-eceeec79.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f10abb6026a6/vmlinux-eceeec79.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ade6c70761ba/bzImage-eceeec79.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e67185...@syzkaller.appspotmail.com

REISERFS (device loop7): Using tea hash to sort names
REISERFS (device loop7): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.7.4076/19672 is trying to acquire lock:
ffff8880239d6a28 (&mm->mmap_lock){++++}-{3:3}, at: __might_fault+0x90/0x110 mm/memory.c:5356

but task is already holding lock:
ffff888074a63090 (&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:

-> #1 (&sbi->lock){+.+.}-{3:3}:
__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
reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27
map_block_for_writepage fs/reiserfs/inode.c:2396 [inline]
reiserfs_write_full_page fs/reiserfs/inode.c:2593 [inline]
reiserfs_writepage+0xa46/0x3030 fs/reiserfs/inode.c:2745
writeout mm/migrate.c:837 [inline]
fallback_migrate_page mm/migrate.c:861 [inline]
move_to_new_page+0x85e/0xd80 mm/migrate.c:912
__unmap_and_move mm/migrate.c:1077 [inline]
unmap_and_move mm/migrate.c:1218 [inline]
migrate_pages+0x1fa9/0x34a0 mm/migrate.c:1493
do_mbind mm/mempolicy.c:1325 [inline]
kernel_mbind mm/mempolicy.c:1472 [inline]
__do_sys_mbind mm/mempolicy.c:1479 [inline]
__se_sys_mbind+0x64c/0x770 mm/mempolicy.c:1475
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+0x2c66/0x7b50 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/0x320 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:

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&sbi->lock);
lock(&mm->mmap_lock);
lock(&sbi->lock);
lock(&mm->mmap_lock);

*** DEADLOCK ***

1 lock held by syz.7.4076/19672:
#0: ffff888074a63090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27

stack backtrace:
CPU: 0 PID: 19672 Comm: syz.7.4076 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/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+0x2c66/0x7b50 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/0x320 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:0x7f07017dee59
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:00007f06ffa38028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f0701a57fa0 RCX: 00007f07017dee59
RDX: 0000200000000080 RSI: 0000000080087601 RDI: 0000000000000009
RBP: 00007f0701874e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0701a58038 R14: 00007f0701a57fa0 R15: 00007fffc69c5368
</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
Reply all
Reply to author
Forward
0 new messages