syzbot


WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock

Status: upstream: reported C repro on 2024/09/20 17:22
Subsystems: ocfs2
[Documentation on labels]
Reported-by: syzbot+0e4e71041c9609d922a2@syzkaller.appspotmail.com
First crash: 4d07h, last: 17h31m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ocfs2?] WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock 0 (1) 2024/09/20 17:22
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock origin:upstream C 4 3d20h 5d02h 0/3 upstream: reported C repro on 2024/09/15 22:26
linux-6.1 WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock 2 3d22h 3d22h 0/3 upstream: reported on 2024/09/17 02:11

Sample crash report:
         option from the mount to silence this warning.
=======================================================
(syz-executor347,6405,1):ocfs2_read_blocks:240 ERROR: status = -12
=====================================
WARNING: bad unlock balance detected!
6.11.0-rc7-syzkaller-g5f5673607153 #0 Not tainted
-------------------------------------
syz-executor347/6405 is trying to release lock (&oi->ip_io_mutex) at:
[<ffff80008201e0dc>] ocfs2_inode_cache_io_unlock+0x20/0x30 fs/ocfs2/inode.c:1650
but there are no more locks to release!

other info that might help us debug this:
1 lock held by syz-executor347/6405:
 #0: ffff0000c26140e0 (&type->s_umount_key#43/1){+.+.}-{3:3}, at: alloc_super+0x1b0/0x83c fs/super.c:344

stack backtrace:
CPU: 1 UID: 0 PID: 6405 Comm: syz-executor347 Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:119
 dump_stack+0x1c/0x28 lib/dump_stack.c:128
 print_unlock_imbalance_bug+0x250/0x2a4 kernel/locking/lockdep.c:5199
 __lock_release kernel/locking/lockdep.c:5436 [inline]
 lock_release+0x4ec/0x9e8 kernel/locking/lockdep.c:5780
 __mutex_unlock_slowpath+0xe0/0x6b4 kernel/locking/mutex.c:912
 mutex_unlock+0x18/0x24 kernel/locking/mutex.c:548
 ocfs2_inode_cache_io_unlock+0x20/0x30 fs/ocfs2/inode.c:1650
 ocfs2_metadata_cache_io_unlock+0x6c/0x90 fs/ocfs2/uptodate.c:95
 ocfs2_read_blocks+0x1164/0x1638 fs/ocfs2/buffer_head_io.c:394
 ocfs2_map_slot_buffers fs/ocfs2/slot_map.c:385 [inline]
 ocfs2_init_slot_info+0x904/0x1214 fs/ocfs2/slot_map.c:424
 ocfs2_initialize_super fs/ocfs2/super.c:2274 [inline]
 ocfs2_fill_super+0x2668/0x4740 fs/ocfs2/super.c:994
 mount_bdev+0x1d4/0x2a0 fs/super.c:1679
 ocfs2_mount+0x44/0x58 fs/ocfs2/super.c:1188
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:662
 vfs_get_tree+0x90/0x28c fs/super.c:1800
 do_new_mount+0x278/0x900 fs/namespace.c:3472
 path_mount+0x590/0xe04 fs/namespace.c:3799
 do_mount fs/namespace.c:3812 [inline]
 __do_sys_mount fs/namespace.c:4020 [inline]
 __se_sys_mount fs/namespace.c:3997 [inline]
 __arm64_sys_mount+0x45c/0x5a8 fs/namespace.c:3997
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598
(syz-executor347,6405,1):ocfs2_map_slot_buffers:388 ERROR: status = -12
(syz-executor347,6405,1):ocfs2_init_slot_info:426 ERROR: status = -12
(syz-executor347,6405,1):ocfs2_initialize_super:2276 ERROR: status = -12
(syz-executor347,6405,0):ocfs2_fill_super:1178 ERROR: status = -12

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/17 07:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 c673ca06 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock
2024/09/20 07:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock
2024/09/19 12:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock
2024/09/17 05:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock
2024/09/17 05:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock
2024/09/16 17:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 49cf0773 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: bad unlock balance in ocfs2_inode_cache_io_unlock
* Struck through repros no longer work on HEAD.