gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS (format 1801)...
gfs2: fsid=syz:syz.0: journal 0 mapped with 1 extents in 0ms
gfs2: fsid=syz:syz.0: first mount done, others may mount
gfs2: fsid=syz:syz.0: fatal: filesystem consistency error - inode = 10 2339, function = gfs2_dinode_in, file = fs/gfs2/glops.c, line = 400
gfs2: fsid=syz:syz.0: G: s:SH n:2/923 f:aqonN t:SH d:EX/0 a:0 v:0 r:2 m:20 p:1
gfs2: fsid=syz:syz.0: H: s:SH f:H e:0 p:5328 [syz.0.0] init_inodes+0x24e/0x320 fs/gfs2/ops_fstype.c:879
gfs2: fsid=syz:syz.0: I: n:10/2339 t:8 f:0x00 d:0x00000000 s:0 p:0
gfs2: fsid=syz:syz.0: about to withdraw this file system
gfs2: fsid=syz:syz.0: Journal recovery skipped for jid 0 until next mount.
gfs2: fsid=syz:syz.0: Glock dequeues delayed: 0
gfs2: fsid=syz:syz.0: File system withdrawn
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:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
gfs2_withdraw+0xb30/0x1430 fs/gfs2/util.c:345
gfs2_dinode_in fs/gfs2/glops.c:-1 [inline]
gfs2_inode_refresh fs/gfs2/glops.c:488 [inline]
inode_go_instantiate+0xaf7/0x1260 fs/gfs2/glops.c:509
gfs2_instantiate+0x168/0x220 fs/gfs2/glock.c:468
gfs2_glock_holder_ready fs/gfs2/glock.c:1317 [inline]
gfs2_glock_wait+0x1d4/0x2a0 fs/gfs2/glock.c:1337
gfs2_glock_nq_init fs/gfs2/glock.h:252 [inline]
gfs2_rindex_update+0x22d/0x370 fs/gfs2/rgrp.c:1045
init_inodes+0x24e/0x320 fs/gfs2/ops_fstype.c:879
gfs2_fill_super+0x1923/0x20d0 fs/gfs2/ops_fstype.c:1255
get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1698
gfs2_get_tree+0x51/0x1e0 fs/gfs2/ops_fstype.c:1337
vfs_get_tree+0x92/0x2b0 fs/super.c:1758
fc_mount fs/namespace.c:1199 [inline]
do_new_mount_fc fs/namespace.c:3642 [inline]
do_new_mount+0x302/0xa10 fs/namespace.c:3718
do_mount fs/namespace.c:4041 [inline]
__do_sys_mount fs/namespace.c:4229 [inline]
__se_sys_mount+0x313/0x410 fs/namespace.c:4206
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:0x7f549ef90f6a
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:00007f549fedde68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f549feddef0 RCX: 00007f549ef90f6a
RDX: 0000200000000040 RSI: 0000200000012500 RDI: 00007f549feddeb0
RBP: 0000200000000040 R08: 00007f549feddef0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000012500
R13: 00007f549feddeb0 R14: 00000000000124c1 R15: 0000200000000080
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.
=======================================================
JBD2: Ignoring recovery information on journal
ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode.
(syz.0.0,5328,0):ocfs2_dio_end_io:2401 ERROR: Direct IO failed, bytes = -28
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.0/5328 is trying to acquire lock:
ffff888042edb480 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline]
ffff888042edb480 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_try_to_free_truncate_log+0xaf/0x360 fs/ocfs2/alloc.c:6132
but task is already holding lock:
ffff888042edb480 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline]
ffff888042edb480 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_defrag_extent fs/ocfs2/move_extents.c:247 [inline]
ffff888042edb480 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: __ocfs2_move_extents_range+0x1283/0x3390 fs/ocfs2/move_extents.c:856
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]);
lock(&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]);
*** DEADLOCK ***
May be due to missing lock nesting notation
5 locks held by syz.0.0/5328:
#0: ffff88801e426420 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write_file+0x60/0x200 fs/namespace.c:543
#1: ffff888042edd100 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline]
#1: ffff888042edd100 (&sb->s_type->i_mutex_key#20){+.+.}-{4:4}, at: ocfs2_move_extents+0x1a2/0x960 fs/ocfs2/move_extents.c:909
#2: ffff888042edcda0 (&oi->ip_alloc_sem){++++}-{4:4}, at: ocfs2_move_extents+0x36b/0x960 fs/ocfs2/move_extents.c:929
#3: ffff888042ed6d80 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline]
#3: ffff888042ed6d80 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x15e/0x4640 fs/ocfs2/suballoc.c:788
#4: ffff888042edb480 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline]
#4: ffff888042edb480 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_defrag_extent fs/ocfs2/move_extents.c:247 [inline]
#4: ffff888042edb480 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: __ocfs2_move_extents_range+0x1283/0x3390 fs/ocfs2/move_extents.c:856
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:
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+0x96/0x1f0 kernel/locking/rwsem.c:1590
inode_lock include/linux/fs.h:980 [inline]
ocfs2_try_to_free_truncate_log+0xaf/0x360 fs/ocfs2/alloc.c:6132
ocfs2_reserve_clusters_with_limit+0x3c2/0xba0 fs/ocfs2/suballoc.c:1186
ocfs2_defrag_extent fs/ocfs2/move_extents.c:266 [inline]
__ocfs2_move_extents_range+0x1634/0x3390 fs/ocfs2/move_extents.c:856
ocfs2_move_extents+0x378/0x960 fs/ocfs2/move_extents.c:931
ocfs2_ioctl_move_extents+0x53e/0x710 fs/ocfs2/move_extents.c:1057
ocfs2_ioctl+0x191/0x750 fs/ocfs2/ioctl.c:942
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/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f549ef8f7c9
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:00007f549fede038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f549f1e5fa0 RCX: 00007f549ef8f7c9
RDX: 00002000000000c0 RSI: 0000000040406f06 RDI: 0000000000000009
RBP: 00007f549f013f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f549f1e6038 R14: 00007f549f1e5fa0 R15: 00007fff8a20f758