FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 1
CPU: 0 UID: 0 PID: 5327 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+0x40c/0x560 lib/fault-inject.c:174
should_failslab+0xa8/0x100 mm/failslab.c:46
slab_pre_alloc_hook mm/slub.c:4539 [inline]
slab_alloc_node mm/slub.c:4897 [inline]
__do_kmalloc_node mm/slub.c:5333 [inline]
__kmalloc_noprof+0xfe/0x720 mm/slub.c:5359
_kmalloc_noprof include/linux/slab.h:992 [inline]
tomoyo_realpath_from_path+0xef/0x640 security/tomoyo/realpath.c:251
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_number_perm+0x246/0x5f0 security/tomoyo/file.c:728
security_file_ioctl+0xc3/0x2a0 security/security.c:2512
__do_sys_ioctl fs/ioctl.c:591 [inline]
__se_sys_ioctl+0x47/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f6f3479e0d9
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:00007f6f356cffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6f34a26090 RCX: 00007f6f3479e0d9
RDX: 00002000000000c0 RSI: 0000000040406f06 RDI: 0000000000000008
RBP: 00007f6f356d0050 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f6f34a26128 R14: 00007f6f34a26090 R15: 00007ffd18f824b8
ERROR: Out of memory at tomoyo_realpath_from_path.
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.0/5327 is trying to acquire lock:
ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline]
ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_try_to_free_truncate_log+0xb4/0x370 fs/ocfs2/alloc.c:6141
but task is already holding lock:
ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline]
ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_defrag_extent fs/ocfs2/move_extents.c:253 [inline]
ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: __ocfs2_move_extents_range fs/ocfs2/move_extents.c:869 [inline]
ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_move_extents+0x1539/0x3b90 fs/ocfs2/move_extents.c:944
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/5327:
#0: ffff88803edea450 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write_file+0x60/0x200 fs/namespace.c:538
#1: ffff8880447397a0 (&sb->s_type->i_mutex_key#24){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline]
#1: ffff8880447397a0 (&sb->s_type->i_mutex_key#24){+.+.}-{4:4}, at: ocfs2_move_extents+0x1ed/0x3b90 fs/ocfs2/move_extents.c:922
#2: ffff888044739458 (&oi->ip_alloc_sem){++++}-{4:4}, at: ocfs2_move_extents+0x3d3/0x3b90 fs/ocfs2/move_extents.c:942
#3: ffff8880446041a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline]
#3: ffff8880446041a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x170/0x4850 fs/ocfs2/suballoc.c:904
#4: ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline]
#4: ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_defrag_extent fs/ocfs2/move_extents.c:253 [inline]
#4: ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: __ocfs2_move_extents_range fs/ocfs2/move_extents.c:869 [inline]
#4: ffff8880446009a0 (&ocfs2_sysfile_lock_key[TRUNCATE_LOG_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_move_extents+0x1539/0x3b90 fs/ocfs2/move_extents.c:944
stack backtrace:
CPU: 0 UID: 0 PID: 5327 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_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3041
check_deadlock kernel/locking/lockdep.c:3093 [inline]
validate_chain kernel/locking/lockdep.c:3895 [inline]
__lock_acquire+0x24df/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
down_write+0x96/0x200 kernel/locking/rwsem.c:1631
inode_lock include/linux/fs.h:1024 [inline]
ocfs2_try_to_free_truncate_log+0xb4/0x370 fs/ocfs2/alloc.c:6141
ocfs2_reserve_clusters_with_limit+0x48d/0xc20 fs/ocfs2/suballoc.c:1302
ocfs2_defrag_extent fs/ocfs2/move_extents.c:272 [inline]
__ocfs2_move_extents_range fs/ocfs2/move_extents.c:869 [inline]
ocfs2_move_extents+0x18b2/0x3b90 fs/ocfs2/move_extents.c:944
ocfs2_ioctl_move_extents+0x562/0x770 fs/ocfs2/move_extents.c:1076
ocfs2_ioctl+0x195/0x7e0 fs/ocfs2/ioctl.c:958
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+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f6f3479e0d9
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:00007f6f356cffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6f34a26090 RCX: 00007f6f3479e0d9
RDX: 00002000000000c0 RSI: 0000000040406f06 RDI: 0000000000000008
RBP: 00007f6f356d0050 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f6f34a26128 R14: 00007f6f34a26090 R15: 00007ffd18f824b8