loop9: detected capacity change from 0 to 512
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.9.750/8910 is trying to acquire lock:
ffff88805fb66c18 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: do_writepages+0x278/0x600 mm/page-writeback.c:2571
but task is already holding lock:
ffff888068884600 (sb_internal){.+.+}-{0:0}, at: evict+0x3c2/0xad0 fs/inode.c:841
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 include/linux/percpu-rwsem.h:53 [inline]
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+0xf2c/0x1a30 fs/ext4/inode.c:228
evict+0x3c2/0xad0 fs/inode.c:841
iput_final fs/inode.c:1960 [inline]
iput.part.0+0x605/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
ext4_ext_migrate+0xd5b/0x2000 fs/ext4/migrate.c:594
__ext4_ioctl+0xd7e/0x42a0 fs/ext4/ioctl.c:1693
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 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+0x14b8/0x2630 kernel/locking/lockdep.c:5237
lock_acquire kernel/locking/lockdep.c:5868 [inline]
lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825
percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline]
percpu_down_read include/linux/percpu-rwsem.h:77 [inline]
ext4_writepages_down_read fs/ext4/ext4.h:1811 [inline]
ext4_writepages+0x21d/0x790 fs/ext4/inode.c:3041
do_writepages+0x278/0x600 mm/page-writeback.c:2571
__writeback_single_inode+0x164/0x1350 fs/fs-writeback.c:1764
writeback_single_inode+0x4d3/0xf30 fs/fs-writeback.c:1883
write_inode_now+0x174/0x1f0 fs/fs-writeback.c:2974
iput_final fs/inode.c:1950 [inline]
iput.part.0+0x7f3/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
ext4_xattr_block_set+0x1426/0x3660 fs/ext4/xattr.c:2153
ext4_xattr_move_to_block fs/ext4/xattr.c:2671 [inline]
ext4_xattr_make_inode_space fs/ext4/xattr.c:2746 [inline]
ext4_expand_extra_isize_ea+0x17c6/0x1d70 fs/ext4/xattr.c:2834
__ext4_expand_extra_isize+0x346/0x480 fs/ext4/inode.c:6434
ext4_try_to_expand_extra_isize fs/ext4/inode.c:6477 [inline]
__ext4_mark_inode_dirty+0x67d/0x890 fs/ext4/inode.c:6555
ext4_evict_inode+0x846/0x1a30 fs/ext4/inode.c:267
evict+0x3c2/0xad0 fs/inode.c:841
iput_final fs/inode.c:1960 [inline]
iput.part.0+0x605/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
ext4_orphan_cleanup+0x71e/0x11e0 fs/ext4/orphan.c:472
__ext4_fill_super fs/ext4/super.c:5701 [inline]
ext4_fill_super+0x916c/0xb5d0 fs/ext4/super.c:5824
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1694
vfs_get_tree+0x92/0x320 fs/super.c:1754
fc_mount fs/namespace.c:1193 [inline]
do_new_mount_fc fs/namespace.c:3758 [inline]
do_new_mount fs/namespace.c:3834 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4154
do_mount fs/namespace.c:4167 [inline]
__do_sys_mount fs/namespace.c:4383 [inline]
__se_sys_mount fs/namespace.c:4360 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:4360
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 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.9.750/8910:
#0: ffff8880688840d8 (&type->s_umount_key#28/1){+.+.}-{4:4}, at: alloc_super+0x244/0xd20 fs/super.c:345
#1: ffff888068884600 (sb_internal){.+.+}-{0:0}, at: evict+0x3c2/0xad0 fs/inode.c:841
#2: ffff88803658a620 (&ei->xattr_sem){++++}-{4:4}, at: ext4_write_trylock_xattr fs/ext4/xattr.h:164 [inline]
#2: ffff88803658a620 (&ei->xattr_sem){++++}-{4:4}, at: ext4_try_to_expand_extra_isize fs/ext4/inode.c:6474 [inline]
#2: ffff88803658a620 (&ei->xattr_sem){++++}-{4:4}, at: __ext4_mark_inode_dirty+0x5f0/0x890 fs/ext4/inode.c:6555
stack backtrace:
CPU: 0 UID: 0 PID: 8910 Comm: syz.9.750 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043
check_noncircular+0x146/0x160 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+0x14b8/0x2630 kernel/locking/lockdep.c:5237
lock_acquire kernel/locking/lockdep.c:5868 [inline]
lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825
percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline]
percpu_down_read include/linux/percpu-rwsem.h:77 [inline]
ext4_writepages_down_read fs/ext4/ext4.h:1811 [inline]
ext4_writepages+0x21d/0x790 fs/ext4/inode.c:3041
do_writepages+0x278/0x600 mm/page-writeback.c:2571
__writeback_single_inode+0x164/0x1350 fs/fs-writeback.c:1764
writeback_single_inode+0x4d3/0xf30 fs/fs-writeback.c:1883
write_inode_now+0x174/0x1f0 fs/fs-writeback.c:2974
iput_final fs/inode.c:1950 [inline]
iput.part.0+0x7f3/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
ext4_xattr_block_set+0x1426/0x3660 fs/ext4/xattr.c:2153
ext4_xattr_move_to_block fs/ext4/xattr.c:2671 [inline]
ext4_xattr_make_inode_space fs/ext4/xattr.c:2746 [inline]
ext4_expand_extra_isize_ea+0x17c6/0x1d70 fs/ext4/xattr.c:2834
__ext4_expand_extra_isize+0x346/0x480 fs/ext4/inode.c:6434
ext4_try_to_expand_extra_isize fs/ext4/inode.c:6477 [inline]
__ext4_mark_inode_dirty+0x67d/0x890 fs/ext4/inode.c:6555
ext4_evict_inode+0x846/0x1a30 fs/ext4/inode.c:267
evict+0x3c2/0xad0 fs/inode.c:841
iput_final fs/inode.c:1960 [inline]
iput.part.0+0x605/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
ext4_orphan_cleanup+0x71e/0x11e0 fs/ext4/orphan.c:472
__ext4_fill_super fs/ext4/super.c:5701 [inline]
ext4_fill_super+0x916c/0xb5d0 fs/ext4/super.c:5824
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1694
vfs_get_tree+0x92/0x320 fs/super.c:1754
fc_mount fs/namespace.c:1193 [inline]
do_new_mount_fc fs/namespace.c:3758 [inline]
do_new_mount fs/namespace.c:3834 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4154
do_mount fs/namespace.c:4167 [inline]
__do_sys_mount fs/namespace.c:4383 [inline]
__se_sys_mount fs/namespace.c:4360 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:4360
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f305fd9e0ca
Code: 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3060c6ee58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f3060c6eee0 RCX: 00007f305fd9e0ca
RDX: 0000200000000180 RSI: 0000200000000000 RDI: 00007f3060c6eea0
RBP: 0000200000000180 R08: 00007f3060c6eee0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000000
R13: 00007f3060c6eea0 R14: 000000000000047a R15: 00002000000001c0
------------[ cut here ]------------
EA inode 11 i_nlink=0
WARNING: fs/ext4/xattr.c:1057 at ext4_xattr_inode_update_ref+0x477/0x590 fs/ext4/xattr.c:1057, CPU#1: syz.9.750/8910
Modules linked in:
CPU: 1 UID: 0 PID: 8910 Comm: syz.9.750 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
RIP: 0010:ext4_xattr_inode_update_ref+0x47e/0x590 fs/ext4/xattr.c:1057
Code: 40 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 0a 01 00 00 48 8d 3d 69 09 fb 0d 48 8b 73 40 44 89 e2 <67> 48 0f b9 3a eb a6 e8 56 a4 25 ff 48 8d 7b 40 48 b8 00 00 00 00
RSP: 0018:ffffc90006b1f180 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888076c80b90 RCX: ffffc90019ff1000
RDX: 0000000000000000 RSI: 000000000000000b RDI: ffffffff90ddf3a0
RBP: ffffc90006b1f248 R08: 0000000000000005 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: 1ffff92000d63e33 R14: 00000000ffffffff R15: 0000000000000000
FS: 00007f3060c6f6c0(0000) GS:ffff888124487000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4bf6e0f000 CR3: 0000000034cf8000 CR4: 0000000000350ef0
Call Trace:
ext4_xattr_inode_dec_ref fs/ext4/xattr.c:1082 [inline]
ext4_xattr_set_entry+0x185b/0x20b0 fs/ext4/xattr.c:1726
ext4_xattr_ibody_set+0x3d3/0x5d0 fs/ext4/xattr.c:2275
ext4_xattr_move_to_block fs/ext4/xattr.c:2678 [inline]
ext4_xattr_make_inode_space fs/ext4/xattr.c:2746 [inline]
ext4_expand_extra_isize_ea+0x180d/0x1d70 fs/ext4/xattr.c:2834
__ext4_expand_extra_isize+0x346/0x480 fs/ext4/inode.c:6434
ext4_try_to_expand_extra_isize fs/ext4/inode.c:6477 [inline]
__ext4_mark_inode_dirty+0x67d/0x890 fs/ext4/inode.c:6555
ext4_evict_inode+0x846/0x1a30 fs/ext4/inode.c:267
evict+0x3c2/0xad0 fs/inode.c:841
iput_final fs/inode.c:1960 [inline]
iput.part.0+0x605/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
ext4_orphan_cleanup+0x71e/0x11e0 fs/ext4/orphan.c:472
__ext4_fill_super fs/ext4/super.c:5701 [inline]
ext4_fill_super+0x916c/0xb5d0 fs/ext4/super.c:5824
get_tree_bdev_flags+0x38c/0x620 fs/super.c:1694
vfs_get_tree+0x92/0x320 fs/super.c:1754
fc_mount fs/namespace.c:1193 [inline]
do_new_mount_fc fs/namespace.c:3758 [inline]
do_new_mount fs/namespace.c:3834 [inline]
path_mount+0x7d0/0x23d0 fs/namespace.c:4154
do_mount fs/namespace.c:4167 [inline]
__do_sys_mount fs/namespace.c:4383 [inline]
__se_sys_mount fs/namespace.c:4360 [inline]
__x64_sys_mount+0x293/0x310 fs/namespace.c:4360
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f305fd9e0ca
Code: 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3060c6ee58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f3060c6eee0 RCX: 00007f305fd9e0ca
RDX: 0000200000000180 RSI: 0000200000000000 RDI: 00007f3060c6eea0
RBP: 0000200000000180 R08: 00007f3060c6eee0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000000
R13: 00007f3060c6eea0 R14: 000000000000047a R15: 00002000000001c0
----------------
Code disassembly (best guess):
0: 40 rex
1: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
8: fc ff df
b: 48 89 fa mov %rdi,%rdx
e: 48 c1 ea 03 shr $0x3,%rdx
12: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
16: 0f 85 0a 01 00 00 jne 0x126
1c: 48 8d 3d 69 09 fb 0d lea 0xdfb0969(%rip),%rdi # 0xdfb098c
23: 48 8b 73 40 mov 0x40(%rbx),%rsi
27: 44 89 e2 mov %r12d,%edx
* 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2f: eb a6 jmp 0xffffffd7
31: e8 56 a4 25 ff call 0xff25a48c
36: 48 8d 7b 40 lea 0x40(%rbx),%rdi
3a: 48 rex.W
3b: b8 00 00 00 00 mov $0x0,%eax