loop3: detected capacity change from 0 to 512
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G L
------------------------------------------------------
syz.3.5653/28104 is trying to acquire lock:
ffff88804d5f4b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: percpu_down_read include/linux/percpu-rwsem.h:77 [inline]
ffff88804d5f4b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_writepages_down_read fs/ext4/ext4.h:1820 [inline]
ffff88804d5f4b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_writepages+0x1ca/0x350 fs/ext4/inode.c:3025
but task is already holding lock:
ffff88804d5f6610 (sb_internal){++++}-{0:0}, at: percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
ffff88804d5f6610 (sb_internal){++++}-{0:0}, at: __sb_start_write include/linux/fs/super.h:19 [inline]
ffff88804d5f6610 (sb_internal){++++}-{0:0}, at: sb_start_intwrite include/linux/fs/super.h:177 [inline]
ffff88804d5f6610 (sb_internal){++++}-{0:0}, at: ext4_evict_inode+0x26f/0xe60 fs/ext4/inode.c:214
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (sb_internal){++++}-{0:0}:
percpu_down_read_internal+0x48/0x1c0 include/linux/percpu-rwsem.h:53
percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
__sb_start_write include/linux/fs/super.h:19 [inline]
sb_start_intwrite include/linux/fs/super.h:177 [inline]
ext4_evict_inode+0x26f/0xe60 fs/ext4/inode.c:214
evict+0x5f4/0xae0 fs/inode.c:837
ext4_ext_migrate+0xd23/0x1010 fs/ext4/migrate.c:588
__ext4_ioctl fs/ext4/ioctl.c:1688 [inline]
ext4_ioctl+0x204a/0x4760 fs/ext4/ioctl.c:1917
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&sbi->s_writepages_rwsem){++++}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a6/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x117/0x340 kernel/locking/lockdep.c:5868
percpu_down_read_internal+0x48/0x1c0 include/linux/percpu-rwsem.h:53
percpu_down_read include/linux/percpu-rwsem.h:77 [inline]
ext4_writepages_down_read fs/ext4/ext4.h:1820 [inline]
ext4_writepages+0x1ca/0x350 fs/ext4/inode.c:3025
do_writepages+0x32e/0x550 mm/page-writeback.c:2598
__writeback_single_inode+0x133/0x1240 fs/fs-writeback.c:1737
writeback_single_inode+0x493/0xc70 fs/fs-writeback.c:1858
write_inode_now+0x160/0x1d0 fs/fs-writeback.c:2924
iput_final fs/inode.c:1941 [inline]
iput+0xa77/0x1030 fs/inode.c:2003
ext4_xattr_block_set+0x1fce/0x2ac0 fs/ext4/xattr.c:2203
ext4_xattr_move_to_block fs/ext4/xattr.c:2668 [inline]
ext4_xattr_make_inode_space fs/ext4/xattr.c:2743 [inline]
ext4_expand_extra_isize_ea+0x12da/0x1ea0 fs/ext4/xattr.c:2831
__ext4_expand_extra_isize+0x30d/0x400 fs/ext4/inode.c:6349
ext4_try_to_expand_extra_isize fs/ext4/inode.c:6392 [inline]
__ext4_mark_inode_dirty+0x45c/0x6e0 fs/ext4/inode.c:6470
ext4_evict_inode+0x79c/0xe60 fs/ext4/inode.c:253
evict+0x5f4/0xae0 fs/inode.c:837
ext4_orphan_cleanup+0xc20/0x1460 fs/ext4/orphan.c:472
__ext4_fill_super fs/ext4/super.c:5658 [inline]
ext4_fill_super+0x58a1/0x6160 fs/ext4/super.c:5777
get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1691
vfs_get_tree+0x92/0x2a0 fs/super.c:1751
fc_mount fs/namespace.c:1199 [inline]
do_new_mount_fc fs/namespace.c:3636 [inline]
do_new_mount+0x302/0xa10 fs/namespace.c:3712
do_mount fs/namespace.c:4035 [inline]
__do_sys_mount fs/namespace.c:4224 [inline]
__se_sys_mount+0x313/0x410 fs/namespace.c:4201
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
rlock(sb_internal);
lock(&sbi->s_writepages_rwsem);
lock(sb_internal);
rlock(&sbi->s_writepages_rwsem);
*** DEADLOCK ***
3 locks held by syz.3.5653/28104:
#0: ffff88804d5f60e0 (&type->s_umount_key#27/1){+.+.}-{4:4}, at: alloc_super+0x28c/0xaa0 fs/super.c:344
#1: ffff88804d5f6610 (sb_internal){++++}-{0:0}, at: percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
#1: ffff88804d5f6610 (sb_internal){++++}-{0:0}, at: __sb_start_write include/linux/fs/super.h:19 [inline]
#1: ffff88804d5f6610 (sb_internal){++++}-{0:0}, at: sb_start_intwrite include/linux/fs/super.h:177 [inline]
#1: ffff88804d5f6610 (sb_internal){++++}-{0:0}, at: ext4_evict_inode+0x26f/0xe60 fs/ext4/inode.c:214
#2: ffff8880477800c8 (&ei->xattr_sem){++++}-{4:4}, at: ext4_write_trylock_xattr fs/ext4/xattr.h:164 [inline]
#2: ffff8880477800c8 (&ei->xattr_sem){++++}-{4:4}, at: ext4_try_to_expand_extra_isize fs/ext4/inode.c:6389 [inline]
#2: ffff8880477800c8 (&ei->xattr_sem){++++}-{4:4}, at: __ext4_mark_inode_dirty+0x3db/0x6e0 fs/ext4/inode.c:6470
stack backtrace:
CPU: 1 UID: 0 PID: 28104 Comm: syz.3.5653 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2043
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a6/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x117/0x340 kernel/locking/lockdep.c:5868
percpu_down_read_internal+0x48/0x1c0 include/linux/percpu-rwsem.h:53
percpu_down_read include/linux/percpu-rwsem.h:77 [inline]
ext4_writepages_down_read fs/ext4/ext4.h:1820 [inline]
ext4_writepages+0x1ca/0x350 fs/ext4/inode.c:3025
do_writepages+0x32e/0x550 mm/page-writeback.c:2598
__writeback_single_inode+0x133/0x1240 fs/fs-writeback.c:1737
writeback_single_inode+0x493/0xc70 fs/fs-writeback.c:1858
write_inode_now+0x160/0x1d0 fs/fs-writeback.c:2924
iput_final fs/inode.c:1941 [inline]
iput+0xa77/0x1030 fs/inode.c:2003
ext4_xattr_block_set+0x1fce/0x2ac0 fs/ext4/xattr.c:2203
ext4_xattr_move_to_block fs/ext4/xattr.c:2668 [inline]
ext4_xattr_make_inode_space fs/ext4/xattr.c:2743 [inline]
ext4_expand_extra_isize_ea+0x12da/0x1ea0 fs/ext4/xattr.c:2831
__ext4_expand_extra_isize+0x30d/0x400 fs/ext4/inode.c:6349
ext4_try_to_expand_extra_isize fs/ext4/inode.c:6392 [inline]
__ext4_mark_inode_dirty+0x45c/0x6e0 fs/ext4/inode.c:6470
ext4_evict_inode+0x79c/0xe60 fs/ext4/inode.c:253
evict+0x5f4/0xae0 fs/inode.c:837
ext4_orphan_cleanup+0xc20/0x1460 fs/ext4/orphan.c:472
__ext4_fill_super fs/ext4/super.c:5658 [inline]
ext4_fill_super+0x58a1/0x6160 fs/ext4/super.c:5777
get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1691
vfs_get_tree+0x92/0x2a0 fs/super.c:1751
fc_mount fs/namespace.c:1199 [inline]
do_new_mount_fc fs/namespace.c:3636 [inline]
do_new_mount+0x302/0xa10 fs/namespace.c:3712
do_mount fs/namespace.c:4035 [inline]
__do_sys_mount fs/namespace.c:4224 [inline]
__se_sys_mount+0x313/0x410 fs/namespace.c:4201
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9dbaf90eea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f9dbbdcfe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f9dbbdcfef0 RCX: 00007f9dbaf90eea
RDX: 0000200000000180 RSI: 00002000000001c0 RDI: 00007f9dbbdcfeb0
RBP: 0000200000000180 R08: 00007f9dbbdcfef0 R09: 0000000000800700
R10: 0000000000800700 R11: 0000000000000246 R12: 00002000000001c0
R13: 00007f9dbbdcfeb0 R14: 000000000000046f R15: 000000000000002c
------------[ cut here ]------------
EA inode 11 i_nlink=2
WARNING: fs/ext4/xattr.c:1058 at 0x0, CPU#1: syz.3.5653/28104
Modules linked in:
CPU: 1 UID: 0 PID: 28104 Comm: syz.3.5653 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:ext4_xattr_inode_update_ref+0x4dc/0x570 fs/ext4/xattr.c:1056
Code: 74 08 4c 89 ef e8 84 88 9a ff 4d 8b 6d 00 48 b8 00 00 00 00 00 fc ff df 41 0f b6 04 06 84 c0 75 77 41 8b 17 4c 89 e7 4c 89 ee <67> 48 0f b9 3a 4c 8b 6c 24 28 e9 bd fe ff ff e8 20 46 cd 08 44 89
RSP: 0018:ffffc90003ef7100 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 1ffff11006346f01 RCX: dffffc0000000000
RDX: 0000000000000002 RSI: 000000000000000b RDI: ffffffff8f87f3b0
RBP: ffffc90003ef71f8 R08: ffff888031a3780f R09: 1ffff11006346f01
R10: dffffc0000000000 R11: ffffed1006346f02 R12: ffffffff8f87f3b0
R13: 000000000000000b R14: 1ffff11006346ecc R15: ffff888031a37660
FS: 00007f9dbbdd06c0(0000) GS:ffff888125f44000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f67a2258d58 CR3: 000000007b594000 CR4: 0000000000350ef0
Call Trace:
ext4_xattr_inode_dec_ref fs/ext4/xattr.c:1081 [inline]
ext4_xattr_set_entry+0xabb/0x1e20 fs/ext4/xattr.c:1723
ext4_xattr_ibody_set+0x254/0x6a0 fs/ext4/xattr.c:2272
ext4_xattr_move_to_block fs/ext4/xattr.c:2675 [inline]
ext4_xattr_make_inode_space fs/ext4/xattr.c:2743 [inline]
ext4_expand_extra_isize_ea+0x13ad/0x1ea0 fs/ext4/xattr.c:2831
__ext4_expand_extra_isize+0x30d/0x400 fs/ext4/inode.c:6349
ext4_try_to_expand_extra_isize fs/ext4/inode.c:6392 [inline]
__ext4_mark_inode_dirty+0x45c/0x6e0 fs/ext4/inode.c:6470
ext4_evict_inode+0x79c/0xe60 fs/ext4/inode.c:253
evict+0x5f4/0xae0 fs/inode.c:837
ext4_orphan_cleanup+0xc20/0x1460 fs/ext4/orphan.c:472
__ext4_fill_super fs/ext4/super.c:5658 [inline]
ext4_fill_super+0x58a1/0x6160 fs/ext4/super.c:5777
get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1691
vfs_get_tree+0x92/0x2a0 fs/super.c:1751
fc_mount fs/namespace.c:1199 [inline]
do_new_mount_fc fs/namespace.c:3636 [inline]
do_new_mount+0x302/0xa10 fs/namespace.c:3712
do_mount fs/namespace.c:4035 [inline]
__do_sys_mount fs/namespace.c:4224 [inline]
__se_sys_mount+0x313/0x410 fs/namespace.c:4201
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9dbaf90eea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f9dbbdcfe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f9dbbdcfef0 RCX: 00007f9dbaf90eea
RDX: 0000200000000180 RSI: 00002000000001c0 RDI: 00007f9dbbdcfeb0
RBP: 0000200000000180 R08: 00007f9dbbdcfef0 R09: 0000000000800700
R10: 0000000000800700 R11: 0000000000000246 R12: 00002000000001c0
R13: 00007f9dbbdcfeb0 R14: 000000000000046f R15: 000000000000002c
----------------
Code disassembly (best guess):
0: 74 08 je 0xa
2: 4c 89 ef mov %r13,%rdi
5: e8 84 88 9a ff call 0xff9a888e
a: 4d 8b 6d 00 mov 0x0(%r13),%r13
e: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
15: fc ff df
18: 41 0f b6 04 06 movzbl (%r14,%rax,1),%eax
1d: 84 c0 test %al,%al
1f: 75 77 jne 0x98
21: 41 8b 17 mov (%r15),%edx
24: 4c 89 e7 mov %r12,%rdi
27: 4c 89 ee mov %r13,%rsi
* 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2f: 4c 8b 6c 24 28 mov 0x28(%rsp),%r13
34: e9 bd fe ff ff jmp 0xfffffef6
39: e8 20 46 cd 08 call 0x8cd465e
3e: 44 rex.R
3f: 89 .byte 0x89