JBD2: Ignoring recovery information on journal
ocfs2: Mounting device (7,9) on (node local, slot 0) with ordered data mode.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G L
------------------------------------------------------
syz.9.2372/23078 is trying to acquire lock:
ffff888057e83e58 (&ocfs2_file_ip_alloc_sem_key/1){+.+.}-{4:4}, at: ocfs2_xattr_set_handle+0x3fc/0x820 fs/ocfs2/xattr.c:3941
but task is already holding lock:
ffff88805525b8e0 (&journal->j_trans_barrier){.+.+}-{4:4}, at: ocfs2_start_trans+0x3a9/0x6f0 fs/ocfs2/journal.c:379
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (&journal->j_trans_barrier){.+.+}-{4:4}:
down_read+0x45/0x320 kernel/locking/rwsem.c:1574
ocfs2_start_trans+0x3a9/0x6f0 fs/ocfs2/journal.c:379
ocfs2_mknod+0xf07/0x2190 fs/ocfs2/namei.c:364
ocfs2_create+0x195/0x460 fs/ocfs2/namei.c:677
lookup_open+0x102d/0x1ae0 fs/namei.c:4575
open_last_lookups fs/namei.c:4774 [inline]
path_openat+0x70c/0x20f0 fs/namei.c:5013
do_file_open+0x23e/0x4a0 fs/namei.c:5045
do_sys_openat2+0x115/0x200 fs/open.c:1443
do_sys_open fs/open.c:1449 [inline]
__do_sys_openat fs/open.c:1789 [inline]
__se_sys_openat fs/open.c:1784 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1784
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #2 (sb_internal#5){.+.+}-{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+0x2a7/0x6f0 fs/ocfs2/journal.c:377
ocfs2_xattr_set+0xf5c/0x13f0 fs/ocfs2/xattr.c:4092
__vfs_setxattr+0x442/0x480 fs/xattr.c:223
__vfs_setxattr_noperm+0x12a/0x660 fs/xattr.c:257
vfs_setxattr+0x151/0x370 fs/xattr.c:344
do_setxattr fs/xattr.c:662 [inline]
filename_setxattr+0x296/0x630 fs/xattr.c:690
path_setxattrat+0x408/0x450 fs/xattr.c:734
__do_sys_lsetxattr fs/xattr.c:775 [inline]
__se_sys_lsetxattr fs/xattr.c:771 [inline]
__x64_sys_lsetxattr+0xbf/0xe0 fs/xattr.c:771
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}:
down_write+0x91/0x200 kernel/locking/rwsem.c:1631
inode_lock include/linux/fs.h:1026 [inline]
ocfs2_reserve_suballoc_bits+0x170/0x4850 fs/ocfs2/suballoc.c:904
ocfs2_reserve_new_metadata_blocks+0x415/0x9a0 fs/ocfs2/suballoc.c:1100
ocfs2_create_refcount_tree+0x27c/0x1310 fs/ocfs2/refcounttree.c:627
ocfs2_reflink_remap_blocks+0x316/0x1ab0 fs/ocfs2/refcounttree.c:4705
ocfs2_remap_file_range+0x451/0x6f0 fs/ocfs2/file.c:2788
vfs_copy_file_range+0xe12/0x1400 fs/read_write.c:2311
__do_sys_copy_file_range fs/read_write.c:2394 [inline]
__se_sys_copy_file_range+0x2fb/0x480 fs/read_write.c:2361
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&ocfs2_file_ip_alloc_sem_key/1){+.+.}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3209 [inline]
check_prevs_add kernel/locking/lockdep.c:3328 [inline]
validate_chain kernel/locking/lockdep.c:3952 [inline]
__lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
down_write_nested+0x98/0x200 kernel/locking/rwsem.c:1757
ocfs2_xattr_set_handle+0x3fc/0x820 fs/ocfs2/xattr.c:3941
ocfs2_set_acl+0x6d1/0x7b0 fs/ocfs2/acl.c:250
ocfs2_init_acl+0x1fe/0x420 fs/ocfs2/acl.c:428
ocfs2_mknod+0x1383/0x2190 fs/ocfs2/namei.c:413
ocfs2_mkdir+0x180/0x430 fs/ocfs2/namei.c:661
vfs_mkdir+0x411/0x660 fs/namei.c:5428
filename_mkdirat+0x284/0x550 fs/namei.c:5461
__do_sys_mkdirat fs/namei.c:5482 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5479
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Chain exists of:
&ocfs2_file_ip_alloc_sem_key/1 --> sb_internal#5 --> &journal->j_trans_barrier
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
rlock(&journal->j_trans_barrier);
lock(sb_internal#5);
lock(&journal->j_trans_barrier);
lock(&ocfs2_file_ip_alloc_sem_key/1);
*** DEADLOCK ***
locks held by syz.9.2372/23078: 8, last CPU#1:
#0: ffff888026d00478 (sb_writers#23){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531
#1: ffff88804bf14fa0 (&type->i_mutex_dir_key#12/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1071 [inline]
#1: ffff88804bf14fa0 (&type->i_mutex_dir_key#12/1){+.+.}-{4:4}, at: __start_dirop fs/namei.c:2924 [inline]
#1: ffff88804bf14fa0 (&type->i_mutex_dir_key#12/1){+.+.}-{4:4}, at: start_dirop fs/namei.c:2948 [inline]
#1: ffff88804bf14fa0 (&type->i_mutex_dir_key#12/1){+.+.}-{4:4}, at: filename_create+0x200/0x370 fs/namei.c:5108
#2: ffff888060805da0 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1026 [inline]
#2: ffff888060805da0 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x170/0x4850 fs/ocfs2/suballoc.c:904
#3: ffff8880608041a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1026 [inline]
#3: ffff8880608041a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x170/0x4850 fs/ocfs2/suballoc.c:904
#4: ffff888060806ba0 (&ocfs2_sysfile_lock_key[LOCAL_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1026 [inline]
#4: ffff888060806ba0 (&ocfs2_sysfile_lock_key[LOCAL_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_local_alloc_bits+0x11f/0x2680 fs/ocfs2/localalloc.c:636
#5: ffff888026d00668 (sb_internal#5){.+.+}-{0:0}, at: ocfs2_mknod+0xf07/0x2190 fs/ocfs2/namei.c:364
#6: ffff88805525b8e0 (&journal->j_trans_barrier){.+.+}-{4:4}, at: ocfs2_start_trans+0x3a9/0x6f0 fs/ocfs2/journal.c:379
#7: ffff888027188950 (jbd2_handle#2){.+.+}-{0:0}, at: start_this_handle+0x1fb0/0x21f0 fs/jbd2/transaction.c:444
stack backtrace:
CPU: 1 UID: 0 PID: 23078 Comm: syz.9.2372 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087
check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219
check_prev_add kernel/locking/lockdep.c:3209 [inline]
check_prevs_add kernel/locking/lockdep.c:3328 [inline]
validate_chain kernel/locking/lockdep.c:3952 [inline]
__lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
down_write_nested+0x98/0x200 kernel/locking/rwsem.c:1757
ocfs2_xattr_set_handle+0x3fc/0x820 fs/ocfs2/xattr.c:3941
ocfs2_set_acl+0x6d1/0x7b0 fs/ocfs2/acl.c:250
ocfs2_init_acl+0x1fe/0x420 fs/ocfs2/acl.c:428
ocfs2_mknod+0x1383/0x2190 fs/ocfs2/namei.c:413
ocfs2_mkdir+0x180/0x430 fs/ocfs2/namei.c:661
vfs_mkdir+0x411/0x660 fs/namei.c:5428
filename_mkdirat+0x284/0x550 fs/namei.c:5461
__do_sys_mkdirat fs/namei.c:5482 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5479
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x00007fce0879fb19
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:00007fce095b3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007fce08a25fa0 RCX: 00007fce0879fb19
RDX: 00000000000001ff RSI: 00002000000002c0 RDI: ffffffffffffff9c
RBP: 00007fce08837b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fce08a26038 R14: 00007fce08a25fa0 R15: 00007ffd67ee4518
FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 68
CPU: 1 UID: 0 PID: 23078 Comm: syz.9.2372 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:74 [inline]
should_fail_ex+0x3eb/0x540 lib/fault-inject.c:175
should_failslab+0xa8/0x100 mm/failslab.c:46
slab_pre_alloc_hook mm/slub.c:4671 [inline]
slab_alloc_node mm/slub.c:5007 [inline]
__do_kmalloc_node mm/slub.c:5526 [inline]
__kmalloc_noprof+0xf9/0x710 mm/slub.c:5552
_kmalloc_noprof include/linux/slab.h:995 [inline]
ocfs2_acl_to_xattr fs/ocfs2/acl.c:86 [inline]
ocfs2_set_acl+0x117/0x7b0 fs/ocfs2/acl.c:244
ocfs2_init_acl+0x3be/0x420 fs/ocfs2/acl.c:445
ocfs2_mknod+0x1383/0x2190 fs/ocfs2/namei.c:413
ocfs2_mkdir+0x180/0x430 fs/ocfs2/namei.c:661
vfs_mkdir+0x411/0x660 fs/namei.c:5428
filename_mkdirat+0x284/0x550 fs/namei.c:5461
__do_sys_mkdirat fs/namei.c:5482 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5479
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x16a/0x530 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x00007fce0879fb19
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:00007fce095b3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007fce08a25fa0 RCX: 00007fce0879fb19
RDX: 0000000000000000 RSI: 0000200000000000 RDI: ffffffffffffff9c
RBP: 00007fce08837b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fce08a26038 R14: 00007fce08a25fa0 R15: 00007ffd67ee4518
(syz.9.2372,23078,1):ocfs2_mknod:417 ERROR: status = -12
(syz.9.2372,23078,1):ocfs2_mknod:507 ERROR: status = -12
(syz.9.2372,23078,1):ocfs2_mkdir:663 ERROR: status = -12