INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. CPU: 1 PID: 9262 Comm: syz-executor.4 Not tainted 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022 Call trace: dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:156 show_stack+0x2c/0x54 arch/arm64/kernel/stacktrace.c:163 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x104/0x16c lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 assign_lock_key+0x134/0x140 kernel/locking/lockdep.c:979 register_lock_class+0xc4/0x2f8 kernel/locking/lockdep.c:1292 __lock_acquire+0xa8/0x30a4 kernel/locking/lockdep.c:4932 lock_acquire+0x100/0x1f8 kernel/locking/lockdep.c:5666 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x54/0x6c kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] ext4_do_update_inode+0x50/0x8f8 fs/ext4/inode.c:5129 ext4_mark_iloc_dirty+0x118/0x1f0 fs/ext4/inode.c:5741 __ext4_mark_inode_dirty+0x138/0x194 fs/ext4/inode.c:5937 ext4_dirty_inode+0x74/0x98 fs/ext4/inode.c:5966 __mark_inode_dirty+0x74/0x348 fs/fs-writeback.c:2381 ext4_mb_new_blocks+0x814/0x9e4 ext4_new_meta_blocks+0x84/0x140 fs/ext4/balloc.c:700 ext4_xattr_block_set+0xce0/0x142c fs/ext4/xattr.c:2078 ext4_xattr_set_handle+0x724/0x994 fs/ext4/xattr.c:2394 ext4_xattr_set+0x100/0x1d0 fs/ext4/xattr.c:2495 ext4_xattr_trusted_set+0x4c/0x64 fs/ext4/xattr_trusted.c:38 __vfs_setxattr+0x250/0x260 fs/xattr.c:182 __vfs_setxattr_noperm+0xcc/0x320 fs/xattr.c:216 __vfs_setxattr_locked+0x16c/0x194 fs/xattr.c:277 vfs_setxattr+0x174/0x280 fs/xattr.c:313 do_setxattr fs/xattr.c:600 [inline] setxattr fs/xattr.c:623 [inline] path_setxattr+0x354/0x414 fs/xattr.c:642 __do_sys_setxattr fs/xattr.c:658 [inline] __se_sys_setxattr fs/xattr.c:654 [inline] __arm64_sys_setxattr+0x2c/0x40 fs/xattr.c:654 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall arch/arm64/kernel/syscall.c:52 [inline] el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:636 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 EXT4-fs error (device loop4): ext4_do_update_inode:5149: inode #2: comm syz-executor.4: corrupted inode contents EXT4-fs error (device loop4): ext4_dirty_inode:5966: inode #2: comm syz-executor.4: mark_inode_dirty error EXT4-fs error (device loop4): ext4_do_update_inode:5149: inode #2: comm syz-executor.4: corrupted inode contents ------------[ cut here ]------------ DEBUG_RWSEMS_WARN_ON(sem->magic != sem): count = 0x1, magic = 0xffff000105d405c8, owner = 0xffff000106fd1a80, curr 0xffff000106fd1a80, list not empty WARNING: CPU: 0 PID: 9262 at kernel/locking/rwsem.c:1347 __up_write+0xf8/0x184 kernel/locking/rwsem.c:1347 Modules linked in: CPU: 0 PID: 9262 Comm: syz-executor.4 Not tainted 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __up_write+0xf8/0x184 kernel/locking/rwsem.c:1347 lr : __up_write+0xf8/0x184 kernel/locking/rwsem.c:1347 sp : ffff8000127ab870 x29: ffff8000127ab870 x28: ffff000105d40508 x27: ffff000105d40560 x26: 0000000000000000 x25: 00000000ffffff8b x24: ffff8000127ab928 x23: 0000000000000000 x22: ffff000105d407b8 x21: ffff80000d30c000 x20: ffff000105d405c8 x19: ffff000105d40560 x18: 0000000000000025 x17: ffff80000bffd6bc x16: 000000000000b67e x15: 00000000000008c0 x14: 0000000002aa14da x13: 0000000000000126 x12: 0000000000040000 x11: 0000000000022e39 x10: ffff80001a405000 x9 : fdc14b5d8e210a00 x8 : fdc14b5d8e210a00 x7 : 0000000000000000 x6 : ffff800008161d1c x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : ffff0001fefbecd0 x1 : 0000000100000000 x0 : 0000000000000095 Call trace: __up_write+0xf8/0x184 kernel/locking/rwsem.c:1347 up_write+0x38/0x48 kernel/locking/rwsem.c:1605 ext4_write_unlock_xattr fs/ext4/xattr.h:173 [inline] ext4_xattr_set_handle+0x400/0x994 fs/ext4/xattr.c:2431 ext4_xattr_set+0x100/0x1d0 fs/ext4/xattr.c:2495 ext4_xattr_trusted_set+0x4c/0x64 fs/ext4/xattr_trusted.c:38 __vfs_setxattr+0x250/0x260 fs/xattr.c:182 __vfs_setxattr_noperm+0xcc/0x320 fs/xattr.c:216 __vfs_setxattr_locked+0x16c/0x194 fs/xattr.c:277 vfs_setxattr+0x174/0x280 fs/xattr.c:313 do_setxattr fs/xattr.c:600 [inline] setxattr fs/xattr.c:623 [inline] path_setxattr+0x354/0x414 fs/xattr.c:642 __do_sys_setxattr fs/xattr.c:658 [inline] __se_sys_setxattr fs/xattr.c:654 [inline] __arm64_sys_setxattr+0x2c/0x40 fs/xattr.c:654 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall arch/arm64/kernel/syscall.c:52 [inline] el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:636 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 irq event stamp: 1359 hardirqs last enabled at (1359): [] lookup_bh_lru+0x160/0x23c fs/buffer.c:1291 hardirqs last disabled at (1358): [] lookup_bh_lru+0x98/0x23c fs/buffer.c:1272 softirqs last enabled at (1112): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (1110): [] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19 ---[ end trace 0000000000000000 ]---