loop0: detected capacity change from 0 to 32768
(syz.0.0,5316,0):ocfs2_block_check_validate:402 ERROR: CRC32 failed: stored: 0xb3775c19, computed 0x2dd1c265. Applying ECC.
(syz.0.0,5316,0):ocfs2_block_check_validate:402 ERROR: CRC32 failed: stored: 0xb3775c19, computed 0x2dd1c265. Applying ECC.
JBD2: Ignoring recovery information on journal
ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.0/5316 is trying to acquire lock:
ffff88804267a2e8 (&oi->ip_xattr_sem){++++}-{4:4}, at: ocfs2_init_acl+0x2fd/0x7e0 fs/ocfs2/acl.c:367
but task is already holding lock:
ffff88803f7688e0 (&journal->j_trans_barrier){.+.+}-{4:4}, at: ocfs2_start_trans+0x3ae/0x700 fs/ocfs2/journal.c:369
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&journal->j_trans_barrier){.+.+}-{4:4}:
down_read+0x4a/0x330 kernel/locking/rwsem.c:1574
ocfs2_start_trans+0x3ae/0x700 fs/ocfs2/journal.c:369
ocfs2_modify_bh+0xe3/0x4d0 fs/ocfs2/quota_local.c:101
ocfs2_local_read_info+0x146b/0x1830 fs/ocfs2/quota_local.c:767
dquot_load_quota_sb+0x76f/0xb70 fs/quota/dquot.c:2416
dquot_load_quota_inode+0x2dc/0x5d0 fs/quota/dquot.c:2453
ocfs2_enable_quotas+0x1c3/0x4a0 fs/ocfs2/super.c:930
ocfs2_fill_super+0x530c/0x6840 fs/ocfs2/super.c:1140
get_tree_bdev_flags+0x430/0x4f0 fs/super.c:1887
vfs_get_tree+0x92/0x2a0 fs/super.c:1947
fc_mount fs/namespace.c:1198 [inline]
do_new_mount_fc fs/namespace.c:3772 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3848
do_mount fs/namespace.c:4181 [inline]
__do_sys_mount fs/namespace.c:4397 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4374
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (sb_internal#2){.+.+}-{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]
ocfs2_start_trans+0x2ac/0x700 fs/ocfs2/journal.c:367
ocfs2_xattr_set+0xe9c/0x13a0 fs/ocfs2/xattr.c:3687
ocfs2_set_acl+0x6fd/0x7b0 fs/ocfs2/acl.c:255
ocfs2_acl_chmod+0x256/0x340 fs/ocfs2/acl.c:342
ocfs2_setattr+0x1462/0x1d10 fs/ocfs2/file.c:1309
notify_change+0xbba/0xea0 fs/attr.c:556
chmod_common+0x262/0x470 fs/open.c:686
do_fchmodat+0x12d/0x230 fs/open.c:731
__do_sys_chmod fs/open.c:755 [inline]
__se_sys_chmod fs/open.c:753 [inline]
__x64_sys_chmod+0x62/0x70 fs/open.c:753
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&oi->ip_xattr_sem){++++}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3181 [inline]
check_prevs_add kernel/locking/lockdep.c:3300 [inline]
validate_chain kernel/locking/lockdep.c:3924 [inline]
__lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5253
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886
down_read+0x4a/0x330 kernel/locking/rwsem.c:1574
ocfs2_init_acl+0x2fd/0x7e0 fs/ocfs2/acl.c:367
ocfs2_mknod+0x166a/0x2240 fs/ocfs2/namei.c:414
ocfs2_mkdir+0x180/0x430 fs/ocfs2/namei.c:660
vfs_mkdir+0x40c/0x620 fs/namei.c:5410
filename_mkdirat+0x285/0x510 fs/namei.c:5443
__do_sys_mkdir fs/namei.c:5470 [inline]
__se_sys_mkdir+0x34/0x150 fs/namei.c:5467
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Chain exists of:
&oi->ip_xattr_sem --> sb_internal#2 --> &journal->j_trans_barrier
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
rlock(&journal->j_trans_barrier);
lock(sb_internal#2);
lock(&journal->j_trans_barrier);
rlock(&oi->ip_xattr_sem);
*** DEADLOCK ***
locks held by syz.0.0/5316: 8, last CPU#0:
#0: ffff88803685e460 (sb_writers#11){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:494
#1: ffff88804267a5a0 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1070 [inline]
#1: ffff88804267a5a0 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: __start_dirop fs/namei.c:2918 [inline]
#1: ffff88804267a5a0 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: start_dirop fs/namei.c:2942 [inline]
#1: ffff88804267a5a0 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: filename_create+0x200/0x370 fs/namei.c:5092
#2: ffff8880426717a0 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1025 [inline]
#2: ffff8880426717a0 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x170/0x4850 fs/ocfs2/suballoc.c:904
#3: ffff8880426725a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1025 [inline]
#3: ffff8880426725a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x170/0x4850 fs/ocfs2/suballoc.c:904
#4: ffff88801f93a5a0 (&ocfs2_sysfile_lock_key[LOCAL_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1025 [inline]
#4: ffff88801f93a5a0 (&ocfs2_sysfile_lock_key[LOCAL_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_local_alloc_bits+0x11f/0x2680 fs/ocfs2/localalloc.c:636
#5: ffff88803685e650 (sb_internal#2){.+.+}-{0:0}, at: ocfs2_mknod+0x116a/0x2240 fs/ocfs2/namei.c:365
#6: ffff88803f7688e0 (&journal->j_trans_barrier){.+.+}-{4:4}, at: ocfs2_start_trans+0x3ae/0x700 fs/ocfs2/journal.c:369
#7: ffff88803eb7a938 (jbd2_handle#2){.+.+}-{0:0}, at: start_this_handle+0x1fbf/0x2200 fs/jbd2/transaction.c:444
stack backtrace:
CPU: 0 UID: 0 PID: 5316 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 04/01/2014
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2059
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2191
check_prev_add kernel/locking/lockdep.c:3181 [inline]
check_prevs_add kernel/locking/lockdep.c:3300 [inline]
validate_chain kernel/locking/lockdep.c:3924 [inline]
__lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5253
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886
down_read+0x4a/0x330 kernel/locking/rwsem.c:1574
ocfs2_init_acl+0x2fd/0x7e0 fs/ocfs2/acl.c:367
ocfs2_mknod+0x166a/0x2240 fs/ocfs2/namei.c:414
ocfs2_mkdir+0x180/0x430 fs/ocfs2/namei.c:660
vfs_mkdir+0x40c/0x620 fs/namei.c:5410
filename_mkdirat+0x285/0x510 fs/namei.c:5443
__do_sys_mkdir fs/namei.c:5470 [inline]
__se_sys_mkdir+0x34/0x150 fs/namei.c:5467
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd1e4d9e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd1e5c6afe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000053
RAX: ffffffffffffffda RBX: 00007fd1e5025fa0 RCX: 00007fd1e4d9e0d9
RDX: 0000000000000000 RSI: 000000000000010b RDI: 0000200000000040
RBP: 00007fd1e4e35024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd1e5026038 R14: 00007fd1e5025fa0 R15: 00007ffe235f9ad8
FAULT_INJECTION: forcing a failure.
name fail_futex, interval 1, probability 0, space 0, times 1
CPU: 0 UID: 0 PID: 5316 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 04/01/2014
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:73 [inline]
should_fail_ex+0x410/0x560 lib/fault-inject.c:174
should_fail_futex kernel/futex/core.c:100 [inline]
get_futex_key+0x1b4/0x1580 kernel/futex/core.c:533
futex_wait_setup+0x4a/0x590 kernel/futex/waitwake.c:648
__futex_wait+0x15f/0x400 kernel/futex/waitwake.c:717
futex_wait+0x121/0x390 kernel/futex/waitwake.c:750
do_futex+0x3e7/0x4e0 kernel/futex/syscalls.c:133
__do_sys_futex kernel/futex/syscalls.c:210 [inline]
__se_sys_futex+0x3a8/0x450 kernel/futex/syscalls.c:191
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd1e4d9e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd1e5c6b0a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007fd1e5025fa8 RCX: 00007fd1e4d9e0d9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fd1e5025fa8
RBP: 00007fd1e5025fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd1e5026038 R14: 00007ffe235f99f0 R15: 00007ffe235f9ad8