syzbot


WARNING: locking bug in ocfs2_inode_lock_full_nested

Status: upstream: reported on 2025/01/21 16:40
Reported-by: syzbot+e16732882a82ece16edf@syzkaller.appspotmail.com
First crash: 65d, last: 25d

Sample crash report:
loop6: detected capacity change from 0 to 1024
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 0 PID: 6288 at kernel/locking/lockdep.c:201 check_wait_context kernel/locking/lockdep.c:4686 [inline]
WARNING: CPU: 0 PID: 6288 at kernel/locking/lockdep.c:201 __lock_acquire+0xadb/0x1ff0 kernel/locking/lockdep.c:4962
Modules linked in:
CPU: 0 PID: 6288 Comm: syz.6.278 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:hlock_class kernel/locking/lockdep.c:201 [inline]
RIP: 0010:check_wait_context kernel/locking/lockdep.c:4686 [inline]
RIP: 0010:__lock_acquire+0xadb/0x1ff0 kernel/locking/lockdep.c:4962
Code: 83 3d 10 dd a7 0c 00 0f 85 3a fa ff ff 48 c7 c7 20 2a ab 8a 48 c7 c6 c0 2c ab 8a e8 0f 41 e9 ff 48 ba 00 00 00 00 00 fc ff df <0f> 0b e9 16 fa ff ff e8 c9 cc ad 02 85 c0 0f 84 85 06 00 00 48 c7
RSP: 0018:ffffc90003dcf3c0 EFLAGS: 00010046
RAX: 36cccdcb323d6900 RBX: 00000000000013ab RCX: 0000000000080000
RDX: dffffc0000000000 RSI: 000000000000628a RDI: 000000000000628b
RBP: 000000000000000a R08: ffffffff8166aa8c R09: ffffed10171c4f24
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000002
R13: ffff888020a04668 R14: 0000000000000000 R15: ffff888020a046e0
FS:  00007f084cb046c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3351fffc CR3: 0000000054e58000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:363 [inline]
 ocfs2_is_hard_readonly fs/ocfs2/ocfs2.h:624 [inline]
 ocfs2_inode_lock_full_nested+0x146/0x1bf0 fs/ocfs2/dlmglue.c:2443
 ocfs2_inode_lock_tracker+0x1d9/0x750 fs/ocfs2/dlmglue.c:2690
 ocfs2_permission+0xb4/0x1b0 fs/ocfs2/file.c:1352
 do_inode_permission fs/namei.c:459 [inline]
 inode_permission+0x22f/0x450 fs/namei.c:526
 __vfs_setxattr_locked+0x71/0x240 fs/xattr.c:264
 vfs_setxattr+0x21d/0x420 fs/xattr.c:303
 do_setxattr fs/xattr.c:588 [inline]
 setxattr+0x27e/0x2e0 fs/xattr.c:611
 path_setxattr+0x1bc/0x2a0 fs/xattr.c:630
 __do_sys_setxattr fs/xattr.c:646 [inline]
 __se_sys_setxattr fs/xattr.c:642 [inline]
 __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:642
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f084ec9b169
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:00007f084cb04038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 00007f084eeb3fa0 RCX: 00007f084ec9b169
RDX: 0000000000000000 RSI: 00004000000002c0 RDI: 0000400000000040
RBP: 00007f084ed1c2a0 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f084eeb3fa0 R15: 00007ffdf0b412c8
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/25 03:53 linux-5.15.y c16c81c81336 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan WARNING: locking bug in ocfs2_inode_lock_full_nested
2025/03/02 19:15 linux-5.15.y c16c81c81336 c3901742 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 WARNING: locking bug in ocfs2_inode_lock_full_nested
2025/01/21 16:39 linux-5.15.y 4735586da88e da72ac06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 WARNING: locking bug in ocfs2_inode_lock_full_nested
* Struck through repros no longer work on HEAD.