EXT4-fs (loop3): 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! 5.15.142-syzkaller #0 Not tainted ------------------------------------- syz-executor.3/4174 is trying to release lock (&type->i_mutex_dir_key) at: [] swap_inode_boot_loader fs/ext4/ioctl.c:262 [inline] [] __ext4_ioctl fs/ext4/ioctl.c:1056 [inline] [] ext4_ioctl+0x285a/0x5b80 fs/ext4/ioctl.c:1276 but there are no more locks to release! other info that might help us debug this: 1 lock held by syz-executor.3/4174: #0: ffff888078b06460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:421 stack backtrace: CPU: 1 PID: 4174 Comm: syz-executor.3 Not tainted 5.15.142-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_unlock_imbalance_bug+0x248/0x2b0 kernel/locking/lockdep.c:5065 __lock_release kernel/locking/lockdep.c:5302 [inline] lock_release+0x596/0x9a0 kernel/locking/lockdep.c:5643 up_write+0x75/0x4d0 kernel/locking/rwsem.c:1593 swap_inode_boot_loader fs/ext4/ioctl.c:262 [inline] __ext4_ioctl fs/ext4/ioctl.c:1056 [inline] ext4_ioctl+0x285a/0x5b80 fs/ext4/ioctl.c:1276 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f47f566cba9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f47f3bee0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f47f578bf80 RCX: 00007f47f566cba9 RDX: 0000000000000000 RSI: 0000000000006611 RDI: 0000000000000004 RBP: 00007f47f56b847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f47f578bf80 R15: 00007fff2f8a5768 ------------[ cut here ]------------ DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && !rwsem_test_oflags(sem, RWSEM_NONSPINNABLE)): count = 0x0, magic = 0xffff888070dde730, owner = 0x0, curr 0xffff888097275940, list empty WARNING: CPU: 1 PID: 4174 at kernel/locking/rwsem.c:1342 __up_write kernel/locking/rwsem.c:1341 [inline] WARNING: CPU: 1 PID: 4174 at kernel/locking/rwsem.c:1342 up_write+0x473/0x4d0 kernel/locking/rwsem.c:1594 Modules linked in: CPU: 1 PID: 4174 Comm: syz-executor.3 Not tainted 5.15.142-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 RIP: 0010:__up_write kernel/locking/rwsem.c:1341 [inline] RIP: 0010:up_write+0x473/0x4d0 kernel/locking/rwsem.c:1594 Code: 48 c7 c7 e0 00 8b 8a 48 c7 c6 a0 03 8b 8a 48 8b 54 24 28 48 8b 4c 24 18 4d 89 e0 4c 8b 4c 24 30 53 e8 d1 11 ea ff 48 83 c4 08 <0f> 0b e9 86 fd ff ff 48 c7 c1 48 ca e3 8d 80 e1 07 80 c1 03 38 c1 RSP: 0018:ffffc90004cf7940 EFLAGS: 00010292 RAX: 5407833763e85900 RBX: ffffffff8a8b01c0 RCX: 0000000000040000 RDX: ffffc90003b6e000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffffc90004cf7a10 R08: ffffffff81665bbc R09: ffffed10173667a8 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000 R13: ffff888070dde730 R14: 1ffff9200099ef30 R15: dffffc0000000000 FS: 00007f47f3bee6c0(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7a83f71038 CR3: 000000007c435000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: swap_inode_boot_loader fs/ext4/ioctl.c:262 [inline] __ext4_ioctl fs/ext4/ioctl.c:1056 [inline] ext4_ioctl+0x285a/0x5b80 fs/ext4/ioctl.c:1276 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f47f566cba9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f47f3bee0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f47f578bf80 RCX: 00007f47f566cba9 RDX: 0000000000000000 RSI: 0000000000006611 RDI: 0000000000000004 RBP: 00007f47f56b847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f47f578bf80 R15: 00007fff2f8a5768