------------[ cut here ]------------
Looking for class "&ea_inode->i_rwsem" with key ext4_fs_type, but found a different class "&sb->s_type->i_mutex_key" with the same key
WARNING: CPU: 1 PID: 7155 at kernel/locking/lockdep.c:935 look_up_lock_class+0xec/0x158 kernel/locking/lockdep.c:932
Modules linked in:
CPU: 1 PID: 7155 Comm: syz-executor.4 Not tainted 6.9.0-rc4-syzkaller-g6a71d2909427 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
pstate: 604010c5 (nZCv daIF +PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : look_up_lock_class+0xec/0x158 kernel/locking/lockdep.c:932
lr : look_up_lock_class+0xec/0x158 kernel/locking/lockdep.c:932
sp : ffff80009e1768e0
x29: ffff80009e1768e0 x28: dfff800000000000 x27: ffff700013c2eda0
x26: ffff8000936a5580 x25: ffff8000936a5000 x24: 0000000000000000
x23: ffff700013c2ed58 x22: 0000000000000000 x21: ffff80008f219df8
x20: ffff0000dfb5c000 x19: ffff8000922d3cb0 x18: 0000000000000008
x17: 0000000000000000 x16: ffff80008ae725bc x15: 0000000000000001
x14: 1fffe000367bde02 x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000000002 x10: 0000000000ff0100 x9 : 95806845256a6700
x8 : 95806845256a6700 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80009e176058 x4 : ffff80008ef650a0 x3 : ffff8000805e616c
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000000
Call trace:
look_up_lock_class+0xec/0x158 kernel/locking/lockdep.c:932
register_lock_class+0x8c/0x6ac kernel/locking/lockdep.c:1284
__lock_acquire+0x184/0x763c kernel/locking/lockdep.c:5014
lock_acquire+0x248/0x73c kernel/locking/lockdep.c:5754
down_write+0x50/0xc0 kernel/locking/rwsem.c:1579
inode_lock include/linux/fs.h:795 [inline]
ext4_xattr_inode_update_ref+0xac/0x4e8 fs/ext4/xattr.c:1042
ext4_xattr_inode_dec_ref fs/ext4/xattr.c:1093 [inline]
ext4_xattr_set_entry+0x1340/0x33d4 fs/ext4/xattr.c:1729
ext4_xattr_block_set+0x560/0x2b8c fs/ext4/xattr.c:1968
ext4_xattr_set_handle+0xc68/0x12d0 fs/ext4/xattr.c:2443
ext4_xattr_set+0x1e0/0x354 fs/ext4/xattr.c:2545
ext4_xattr_trusted_set+0x4c/0x64 fs/ext4/xattr_trusted.c:38
__vfs_setxattr+0x3d8/0x400 fs/xattr.c:200
__vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:234
__vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:295
vfs_setxattr+0x1a8/0x344 fs/xattr.c:321
do_setxattr fs/xattr.c:629 [inline]
setxattr+0x208/0x29c fs/xattr.c:652
path_setxattr+0x17c/0x258 fs/xattr.c:671
__do_sys_setxattr fs/xattr.c:687 [inline]
__se_sys_setxattr fs/xattr.c:683 [inline]
__arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:683
__invoke_syscall arch/arm64/kernel/syscall.c:34 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152
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
irq event stamp: 2527
hardirqs last enabled at (2527): [<ffff800080c2c848>] lookup_bh_lru fs/buffer.c:1385 [inline]
hardirqs last enabled at (2527): [<ffff800080c2c848>] __find_get_block+0x3ac/0xdc4 fs/buffer.c:1397
hardirqs last disabled at (2526): [<ffff800080c2c504>] lookup_bh_lru fs/buffer.c:1362 [inline]
hardirqs last disabled at (2526): [<ffff800080c2c504>] __find_get_block+0x68/0xdc4 fs/buffer.c:1397
softirqs last enabled at (264): [<ffff8000800218e4>] softirq_handle_end kernel/softirq.c:400 [inline]
softirqs last enabled at (264): [<ffff8000800218e4>] __do_softirq+0xb10/0xd2c kernel/softirq.c:583
softirqs last disabled at (243): [<ffff80008002ad34>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:81
---[ end trace 0000000000000000 ]---
============================================
WARNING: possible recursive locking detected
6.9.0-rc4-syzkaller-g6a71d2909427 #0 Tainted: G W
--------------------------------------------
syz-executor.4/7155 is trying to acquire lock:
ffff0000dfb5c000 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: inode_lock include/linux/fs.h:795 [inline]
ffff0000dfb5c000 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: ext4_xattr_inode_update_ref+0xac/0x4e8 fs/ext4/xattr.c:1042
but task is already holding lock:
ffff0000e4db4000 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: inode_lock include/linux/fs.h:795 [inline]
ffff0000e4db4000 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: vfs_setxattr+0x17c/0x344 fs/xattr.c:320
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&sb->s_type->i_mutex_key#8);
lock(&sb->s_type->i_mutex_key#8);
*** DEADLOCK ***
May be due to missing lock nesting notation
3 locks held by syz-executor.4/7155:
#0: ffff0000ce304420 (sb_writers#3){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:409
#1: ffff0000e4db4000 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: inode_lock include/linux/fs.h:795 [inline]
#1: ffff0000e4db4000 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: vfs_setxattr+0x17c/0x344 fs/xattr.c:320
#2: ffff0000e4db3cc8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:155 [inline]
#2: ffff0000e4db3cc8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_xattr_set_handle+0x1dc/0x12d0 fs/ext4/xattr.c:2358
stack backtrace:
CPU: 1 PID: 7155 Comm: syz-executor.4 Tainted: G W 6.9.0-rc4-syzkaller-g6a71d2909427 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114
dump_stack+0x1c/0x28 lib/dump_stack.c:123
print_deadlock_bug+0x4e4/0x660 kernel/locking/lockdep.c:3012
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain kernel/locking/lockdep.c:3856 [inline]
__lock_acquire+0x5fe4/0x763c kernel/locking/lockdep.c:5137
lock_acquire+0x248/0x73c kernel/locking/lockdep.c:5754
down_write+0x50/0xc0 kernel/locking/rwsem.c:1579
inode_lock include/linux/fs.h:795 [inline]
ext4_xattr_inode_update_ref+0xac/0x4e8 fs/ext4/xattr.c:1042
ext4_xattr_inode_dec_ref fs/ext4/xattr.c:1093 [inline]
ext4_xattr_set_entry+0x1340/0x33d4 fs/ext4/xattr.c:1729
ext4_xattr_block_set+0x560/0x2b8c fs/ext4/xattr.c:1968
ext4_xattr_set_handle+0xc68/0x12d0 fs/ext4/xattr.c:2443
ext4_xattr_set+0x1e0/0x354 fs/ext4/xattr.c:2545
ext4_xattr_trusted_set+0x4c/0x64 fs/ext4/xattr_trusted.c:38
__vfs_setxattr+0x3d8/0x400 fs/xattr.c:200
__vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:234
__vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:295
vfs_setxattr+0x1a8/0x344 fs/xattr.c:321
do_setxattr fs/xattr.c:629 [inline]
setxattr+0x208/0x29c fs/xattr.c:652
path_setxattr+0x17c/0x258 fs/xattr.c:671
__do_sys_setxattr fs/xattr.c:687 [inline]
__se_sys_setxattr fs/xattr.c:683 [inline]
__arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:683
__invoke_syscall arch/arm64/kernel/syscall.c:34 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152
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