Hello,
syzbot found the following issue on:
HEAD commit: 68efe5a6c16a Linux 5.15.197
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=139ff09a580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=7e6ed99963d6ee1d
dashboard link:
https://syzkaller.appspot.com/bug?extid=7ba223fef4125a07cc4b
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=11b39022580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=15b39022580000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/900f9b9bd850/disk-68efe5a6.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/1e089a5019a6/vmlinux-68efe5a6.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/b319f477b907/bzImage-68efe5a6.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/92068e517d2e/mount_0.gz
fsck result: failed (log:
https://syzkaller.appspot.com/x/fsck.log?x=1187eb92580000)
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+7ba223...@syzkaller.appspotmail.com
EXT4-fs (loop0): 1 truncate cleaned up
EXT4-fs (loop0): mounted filesystem without journal. Opts: jqfmt=vfsold,resgid=0x000000000000ee00,bh,noload,data_err=ignore,usrjquota=,,errors=continue. Quota mode: none.
=====================================
WARNING: bad unlock balance detected!
syzkaller #0 Not tainted
-------------------------------------
syz.0.17/4364 is trying to release lock (&type->i_mutex_dir_key) at:
[<ffffffff820a7110>] swap_inode_boot_loader+0x310/0x10f0 fs/ext4/ioctl.c:262
but there are no more locks to release!
other info that might help us debug this:
1 lock held by syz.0.17/4364:
#0: ffff888076094460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write_file+0x5c/0x200 fs/namespace.c:430
stack backtrace:
CPU: 1 PID: 4364 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
__lock_release kernel/locking/lockdep.c:5302 [inline]
lock_release+0x52f/0x870 kernel/locking/lockdep.c:5643
up_write+0x29/0x420 kernel/locking/rwsem.c:1603
swap_inode_boot_loader+0x310/0x10f0 fs/ext4/ioctl.c:262
__ext4_ioctl fs/ext4/ioctl.c:1056 [inline]
ext4_ioctl+0x18f3/0x3590 fs/ext4/ioctl.c:1282
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:0x7fc8fa677749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd0f7b3c38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fc8fa8cdfa0 RCX: 00007fc8fa677749
RDX: 0000000000000000 RSI: 0000000000006611 RDI: 0000000000000004
RBP: 00007fc8fa6fbf91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc8fa8cdfa0 R14: 00007fc8fa8cdfa0 R15: 0000000000000003
</TASK>
------------[ cut here ]------------
DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && !rwsem_test_oflags(sem, RWSEM_NONSPINNABLE)): count = 0x0, magic = 0xffff88805d1fa168, owner = 0x0, curr 0xffff888025afbb80, list empty
WARNING: CPU: 1 PID: 4364 at kernel/locking/rwsem.c:1350 __up_write kernel/locking/rwsem.c:1349 [inline]
WARNING: CPU: 1 PID: 4364 at kernel/locking/rwsem.c:1350 up_write+0x3a1/0x420 kernel/locking/rwsem.c:1604
Modules linked in:
CPU: 1 PID: 4364 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:__up_write kernel/locking/rwsem.c:1349 [inline]
RIP: 0010:up_write+0x3a1/0x420 kernel/locking/rwsem.c:1604
Code: 44 d0 48 c7 c7 60 0f 0b 8a 48 c7 c6 20 12 0b 8a 48 8b 14 24 4c 89 f1 4d 89 e0 4c 8b 4c 24 08 41 52 e8 c3 d0 3b 08 48 83 c4 08 <0f> 0b e9 6b fd ff ff 48 c7 c1 48 69 69 8d 80 e1 07 80 c1 03 38 c1
RSP: 0018:ffffc9000302f950 EFLAGS: 00010296
RAX: 1a3902a8fe7d9e00 RBX: ffff88805d1fa168 RCX: ffff888025afbb80
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: dffffc0000000000 R09: ffffed10172267b0
R10: ffffed10172267b0 R11: 1ffff110172267af R12: 0000000000000000
R13: ffff88805d1fa1c0 R14: ffff88805d1fa168 R15: 1ffff1100ba3f42e
FS: 000055557bcf6500(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000001e7f8000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
swap_inode_boot_loader+0x310/0x10f0 fs/ext4/ioctl.c:262
__ext4_ioctl fs/ext4/ioctl.c:1056 [inline]
ext4_ioctl+0x18f3/0x3590 fs/ext4/ioctl.c:1282
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:0x7fc8fa677749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd0f7b3c38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fc8fa8cdfa0 RCX: 00007fc8fa677749
RDX: 0000000000000000 RSI: 0000000000006611 RDI: 0000000000000004
RBP: 00007fc8fa6fbf91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc8fa8cdfa0 R14: 00007fc8fa8cdfa0 R15: 0000000000000003
</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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
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