loop0: detected capacity change from 0 to 32768
=======================================================
WARNING: The mand mount option has been deprecated and
and is ignored by this kernel. Remove the mand
option from the mount to silence this warning.
=======================================================
XFS (loop0): Mounting V5 Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791
XFS (loop0): Ending clean mount
XFS (loop0): Quotacheck needed: Please wait.
XFS (loop0): Quotacheck: Done.
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.0/5328 is trying to acquire lock:
ffff88804326a698 (&xfs_nondir_ilock_class){++++}-{4:4}, at: xfs_reclaim_inode fs/xfs/xfs_icache.c:1040 [inline]
ffff88804326a698 (&xfs_nondir_ilock_class){++++}-{4:4}, at: xfs_icwalk_process_inode fs/xfs/xfs_icache.c:1732 [inline]
ffff88804326a698 (&xfs_nondir_ilock_class){++++}-{4:4}, at: xfs_icwalk_ag+0x12c5/0x1ab0 fs/xfs/xfs_icache.c:1814
but task is already holding lock:
ffff88804326d018 (&xfs_nondir_ilock_class){++++}-{4:4}, at: xfs_ilock_for_iomap fs/xfs/xfs_iomap.c:789 [inline]
ffff88804326d018 (&xfs_nondir_ilock_class){++++}-{4:4}, at: xfs_buffered_write_iomap_begin+0x4d0/0x1890 fs/xfs/xfs_iomap.c:1735
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&xfs_nondir_ilock_class);
lock(&xfs_nondir_ilock_class);
*** DEADLOCK ***
May be due to missing lock nesting notation
5 locks held by syz.0.0/5328:
#0: ffff888000712478 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320 fs/file.c:1232
#1: ffff88801eb1c420 (sb_writers#12){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3111 [inline]
#1: ffff88801eb1c420 (sb_writers#12){.+.+}-{0:0}, at: vfs_write+0x211/0xb30 fs/read_write.c:682
#2: ffff88804326d230 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: xfs_ilock+0xfe/0x390 fs/xfs/xfs_inode.c:149
#3: ffff88804326d018 (&xfs_nondir_ilock_class){++++}-{4:4}, at: xfs_ilock_for_iomap fs/xfs/xfs_iomap.c:789 [inline]
#3: ffff88804326d018 (&xfs_nondir_ilock_class){++++}-{4:4}, at: xfs_buffered_write_iomap_begin+0x4d0/0x1890 fs/xfs/xfs_iomap.c:1735
#4: ffff88801eb1c0e0 (&type->s_umount_key#51){.+.+}-{4:4}, at: super_trylock_shared fs/super.c:562 [inline]
#4: ffff88801eb1c0e0 (&type->s_umount_key#51){.+.+}-{4:4}, at: super_cache_scan+0x91/0x4b0 fs/super.c:197
stack backtrace:
CPU: 0 UID: 0 PID: 5328 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_deadlock_bug+0x28b/0x2a0 kernel/locking/lockdep.c:3041
check_deadlock kernel/locking/lockdep.c:3093 [inline]
validate_chain+0x1a3f/0x2140 kernel/locking/lockdep.c:3895
__lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
down_write_nested+0x9d/0x200 kernel/locking/rwsem.c:1706
xfs_reclaim_inode fs/xfs/xfs_icache.c:1040 [inline]
xfs_icwalk_process_inode fs/xfs/xfs_icache.c:1732 [inline]
xfs_icwalk_ag+0x12c5/0x1ab0 fs/xfs/xfs_icache.c:1814
xfs_icwalk fs/xfs/xfs_icache.c:1862 [inline]
xfs_reclaim_inodes_nr+0x1e3/0x260 fs/xfs/xfs_icache.c:1106
super_cache_scan+0x41b/0x4b0 fs/super.c:228
do_shrink_slab+0x6ef/0x1110 mm/shrinker.c:437
shrink_slab+0xd74/0x10d0 mm/shrinker.c:664
shrink_one+0x28a/0x7c0 mm/vmscan.c:4955
shrink_many mm/vmscan.c:5016 [inline]
lru_gen_shrink_node mm/vmscan.c:5094 [inline]
shrink_node+0x315d/0x3780 mm/vmscan.c:6081
shrink_zones mm/vmscan.c:6339 [inline]
do_try_to_free_pages+0x668/0x1960 mm/vmscan.c:6401
try_to_free_pages+0x8a2/0xdd0 mm/vmscan.c:6647
__perform_reclaim mm/page_alloc.c:4345 [inline]
__alloc_pages_direct_reclaim+0x144/0x300 mm/page_alloc.c:4367
__alloc_pages_slowpath+0x60c/0xcf0 mm/page_alloc.c:4816
__alloc_frozen_pages_noprof+0x319/0x370 mm/page_alloc.c:5196
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
alloc_frozen_pages_noprof mm/mempolicy.c:2487 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2507
stack_depot_save_flags+0x777/0x860 lib/stackdepot.c:677
save_stack+0x103/0x1f0 mm/page_owner.c:157
__set_page_owner+0x8d/0x4c0 mm/page_owner.c:332
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
prep_new_page mm/page_alloc.c:1858 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884
__alloc_pages_slowpath+0x30b/0xcf0 mm/page_alloc.c:4714
__alloc_frozen_pages_noprof+0x319/0x370 mm/page_alloc.c:5196
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
alloc_frozen_pages_noprof mm/mempolicy.c:2487 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2507
stack_depot_save_flags+0x777/0x860 lib/stackdepot.c:677
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x4f/0x80 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:400 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417
kasan_kmalloc include/linux/kasan.h:262 [inline]
__kmalloc_cache_noprof+0x3d5/0x6f0 mm/slub.c:5763
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
xfs_iext_alloc_node fs/xfs/libxfs/xfs_iext_tree.c:401 [inline]
xfs_iext_alloc_root fs/xfs/libxfs/xfs_iext_tree.c:593 [inline]
xfs_iext_insert_raw+0x249/0x3270 fs/xfs/libxfs/xfs_iext_tree.c:645
xfs_iext_insert+0x36/0x220 fs/xfs/libxfs/xfs_iext_tree.c:684
xfs_bmap_add_extent_hole_delay+0x4aa/0x810 fs/xfs/xfs_iomap.c:1373
xfs_bmapi_reserve_delalloc+0xc45/0xd30 fs/xfs/xfs_iomap.c:1492
xfs_buffered_write_iomap_begin+0x116c/0x1890 fs/xfs/xfs_iomap.c:1907
iomap_iter+0x534/0xde0 fs/iomap/iter.c:108
iomap_file_buffered_write+0x207/0x9b0 fs/iomap/buffered-io.c:1070
xfs_file_buffered_write+0x209/0x8a0 fs/xfs/xfs_file.c:974
new_sync_write fs/read_write.c:593 [inline]
vfs_write+0x5c9/0xb30 fs/read_write.c:686
ksys_write+0x145/0x250 fs/read_write.c:738
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f56ee38f6c9
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:00007f56ef213038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f56ee5e5fa0 RCX: 00007f56ee38f6c9
RDX: 000000000208e24b RSI: 0000200000000000 RDI: 0000000000000004
RBP: 00007f56ee411f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f56ee5e6038 R14: 00007f56ee5e5fa0 R15: 00007fffce662268
</TASK>
syz.0.0 (5328) used greatest stack depth: 17256 bytes left