[syzbot] [jfs?] possible deadlock in jfs_commit_inode

1 view
Skip to first unread message

syzbot

unread,
1:31 AM (6 hours ago) 1:31 AM
to jfs-dis...@lists.sourceforge.net, linux-...@vger.kernel.org, sha...@kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3b058d1aeeef Add linux-next specific files for 20260327
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=105db0d2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=4acce231a75c746f
dashboard link: https://syzkaller.appspot.com/bug?extid=8f2651aaae7c1281c2a7
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/5a5b73363d45/disk-3b058d1a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ecba5c3ac106/vmlinux-3b058d1a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/348124eb71de/bzImage-3b058d1a.xz

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

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G L
------------------------------------------------------
syz-executor/19541 is trying to acquire lock:
ffff88804204ae90 (&jfs_ip->commit_mutex){+.+.}-{4:4}, at: jfs_commit_inode+0x1ca/0x530 fs/jfs/inode.c:108

but task is already holding lock:
ffff888031adc918 (&(log)->loglock){+.+.}-{4:4}, at: jfs_umount+0x17f/0x3d0 fs/jfs/jfs_umount.c:66

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&(log)->loglock){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:632 [inline]
__mutex_lock+0x19e/0x1420 kernel/locking/mutex.c:794
lmLog+0x78/0xa40 fs/jfs/jfs_logmgr.c:234
xtLog fs/jfs/jfs_txnmgr.c:1710 [inline]
txLog fs/jfs/jfs_txnmgr.c:1398 [inline]
txCommit+0x19ab/0x5410 fs/jfs/jfs_txnmgr.c:1266
jfs_create+0x8f4/0xb10 fs/jfs/namei.c:157
lookup_open fs/namei.c:4511 [inline]
open_last_lookups fs/namei.c:4611 [inline]
path_openat+0x1395/0x3860 fs/namei.c:4855
do_file_open+0x23e/0x4a0 fs/namei.c:4887
do_sys_openat2+0x113/0x200 fs/open.c:1366
do_sys_open fs/open.c:1372 [inline]
__do_sys_creat fs/open.c:1450 [inline]
__se_sys_creat fs/open.c:1444 [inline]
__x64_sys_creat+0x8f/0xc0 fs/open.c:1444
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&jfs_ip->commit_mutex/1){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:632 [inline]
__mutex_lock+0x19e/0x1420 kernel/locking/mutex.c:794
jfs_create+0x249/0xb10 fs/jfs/namei.c:102
lookup_open fs/namei.c:4511 [inline]
open_last_lookups fs/namei.c:4611 [inline]
path_openat+0x1395/0x3860 fs/namei.c:4855
do_file_open+0x23e/0x4a0 fs/namei.c:4887
do_sys_openat2+0x113/0x200 fs/open.c:1366
do_sys_open fs/open.c:1372 [inline]
__do_sys_creat fs/open.c:1450 [inline]
__se_sys_creat fs/open.c:1444 [inline]
__x64_sys_creat+0x8f/0xc0 fs/open.c:1444
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&jfs_ip->commit_mutex){+.+.}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
__mutex_lock_common kernel/locking/mutex.c:632 [inline]
__mutex_lock+0x19e/0x1420 kernel/locking/mutex.c:794
jfs_commit_inode+0x1ca/0x530 fs/jfs/inode.c:108
jfs_write_inode+0x145/0x220 fs/jfs/inode.c:138
write_inode fs/fs-writeback.c:1582 [inline]
__writeback_single_inode+0x75a/0x10e0 fs/fs-writeback.c:1825
writeback_single_inode+0x4ac/0xdc0 fs/fs-writeback.c:1881
write_inode_now+0x1c2/0x290 fs/fs-writeback.c:2972
iput_final fs/inode.c:1956 [inline]
iput+0x8c1/0xe80 fs/inode.c:2015
jfs_umount+0x198/0x3d0 fs/jfs/jfs_umount.c:72
jfs_put_super+0x8c/0x190 fs/jfs/super.c:194
generic_shutdown_super+0x13d/0x2d0 fs/super.c:646
kill_block_super+0x44/0x90 fs/super.c:1725
deactivate_locked_super+0xbc/0x130 fs/super.c:476
cleanup_mnt+0x437/0x4d0 fs/namespace.c:1312
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:238 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:269 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:328 [inline]
do_syscall_64+0x33e/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
&jfs_ip->commit_mutex --> &jfs_ip->commit_mutex/1 --> &(log)->loglock

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&(log)->loglock);
lock(&jfs_ip->commit_mutex/1);
lock(&(log)->loglock);
lock(&jfs_ip->commit_mutex);

*** DEADLOCK ***

2 locks held by syz-executor/19541:
#0: ffff8880338a00d8 (&type->s_umount_key#89){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline]
#0: ffff8880338a00d8 (&type->s_umount_key#89){++++}-{4:4}, at: __super_lock_excl fs/super.c:73 [inline]
#0: ffff8880338a00d8 (&type->s_umount_key#89){++++}-{4:4}, at: deactivate_super+0xa9/0xe0 fs/super.c:508
#1: ffff888031adc918 (&(log)->loglock){+.+.}-{4:4}, at: jfs_umount+0x17f/0x3d0 fs/jfs/jfs_umount.c:66

stack backtrace:
CPU: 1 UID: 0 PID: 19541 Comm: syz-executor Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
__mutex_lock_common kernel/locking/mutex.c:632 [inline]
__mutex_lock+0x19e/0x1420 kernel/locking/mutex.c:794
jfs_commit_inode+0x1ca/0x530 fs/jfs/inode.c:108
jfs_write_inode+0x145/0x220 fs/jfs/inode.c:138
write_inode fs/fs-writeback.c:1582 [inline]
__writeback_single_inode+0x75a/0x10e0 fs/fs-writeback.c:1825
writeback_single_inode+0x4ac/0xdc0 fs/fs-writeback.c:1881
write_inode_now+0x1c2/0x290 fs/fs-writeback.c:2972
iput_final fs/inode.c:1956 [inline]
iput+0x8c1/0xe80 fs/inode.c:2015
jfs_umount+0x198/0x3d0 fs/jfs/jfs_umount.c:72
jfs_put_super+0x8c/0x190 fs/jfs/super.c:194
generic_shutdown_super+0x13d/0x2d0 fs/super.c:646
kill_block_super+0x44/0x90 fs/super.c:1725
deactivate_locked_super+0xbc/0x130 fs/super.c:476
cleanup_mnt+0x437/0x4d0 fs/namespace.c:1312
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:238 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:269 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:328 [inline]
do_syscall_64+0x33e/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f653bf9d9d7
Code: a2 c7 05 1c fd 24 00 00 00 00 00 eb 96 e8 e1 12 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffd8e8b50f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f653c032050 RCX: 00007f653bf9d9d7
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffd8e8b51b0
RBP: 00007ffd8e8b51b0 R08: 00007ffd8e8b61b0 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd8e8b6240
R13: 00007f653c032050 R14: 00000000000bcbb7 R15: 00007ffd8e8b6280
</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