syzbot


possible deadlock in __ocfs2_move_extents_range

Status: upstream: reported on 2025/03/11 15:42
Reported-by: syzbot+3ed15bdbe4f8bfda409a@syzkaller.appspotmail.com
First crash: 498d, last: 17d
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in __ocfs2_move_extents_range ocfs2 4 318 345d 495d 0/29 auto-obsoleted due to no activity on 2025/10/20 12:22
linux-6.1 possible deadlock in __ocfs2_move_extents_range 4 126 69d 494d 0/3 upstream: reported on 2025/03/15 00:05
linux-6.6 possible deadlock in __ocfs2_move_extents_range 4 120 6d00h 389d 0/2 upstream: reported on 2025/06/27 23:37

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.4.21/4421 is trying to acquire lock:
ffff8880703a3488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
ffff8880703a3488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:646 [inline]
ffff8880703a3488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x1a31/0x3450 fs/ocfs2/move_extents.c:866

but task is already holding lock:
ffff88807038d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
ffff88807038d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:638 [inline]
ffff88807038d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x131f/0x3450 fs/ocfs2/move_extents.c:866

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}:
       down_write+0x38/0x60 kernel/locking/rwsem.c:1551
       inode_lock include/linux/fs.h:787 [inline]
       __ocfs2_flush_truncate_log+0x351/0x1110 fs/ocfs2/alloc.c:6044
       ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6074 [inline]
       ocfs2_try_to_free_truncate_log+0x1a7/0x370 fs/ocfs2/alloc.c:6133
       ocfs2_reserve_clusters_with_limit+0x48a/0xc10 fs/ocfs2/suballoc.c:1202
       ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1245 [inline]
       ocfs2_lock_allocators+0x2ce/0x5f0 fs/ocfs2/suballoc.c:2701
       ocfs2_write_begin_nolock+0x1b97/0x44b0 fs/ocfs2/aops.c:1743
       ocfs2_dio_wr_get_block+0xba4/0x1810 fs/ocfs2/aops.c:2241
       get_more_blocks fs/direct-io.c:673 [inline]
       do_direct_IO fs/direct-io.c:959 [inline]
       do_blockdev_direct_IO fs/direct-io.c:1276 [inline]
       __blockdev_direct_IO+0x142d/0x3b20 fs/direct-io.c:1368
       ocfs2_direct_IO+0x233/0x2a0 fs/ocfs2/aops.c:2483
       generic_file_direct_write+0x222/0x470 mm/filemap.c:3687
       __generic_file_write_iter+0x2b2/0x4e0 mm/filemap.c:3869
       ocfs2_file_write_iter+0x171a/0x1ee0 fs/ocfs2/file.c:2472
       do_iter_readv_writev+0x47d/0x5f0 fs/read_write.c:-1
       do_iter_write+0x1f8/0x7a0 fs/read_write.c:855
       iter_file_splice_write+0x6be/0xcf0 fs/splice.c:689
       do_splice_from fs/splice.c:767 [inline]
       direct_splice_actor+0xe1/0x130 fs/splice.c:956
       splice_direct_to_actor+0x4e8/0xc00 fs/splice.c:902
       do_splice_direct+0x1d4/0x2f0 fs/splice.c:1008
       do_sendfile+0x524/0xe30 fs/read_write.c:1249
       __do_sys_sendfile64 fs/read_write.c:1317 [inline]
       __se_sys_sendfile64+0x141/0x1a0 fs/read_write.c:1303
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain kernel/locking/lockdep.c:3788 [inline]
       __lock_acquire+0x2c66/0x7b50 kernel/locking/lockdep.c:5012
       lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
       down_write+0x38/0x60 kernel/locking/rwsem.c:1551
       inode_lock include/linux/fs.h:787 [inline]
       ocfs2_move_extent fs/ocfs2/move_extents.c:646 [inline]
       __ocfs2_move_extents_range+0x1a31/0x3450 fs/ocfs2/move_extents.c:866
       ocfs2_move_extents+0x409/0xa40 fs/ocfs2/move_extents.c:938
       ocfs2_ioctl_move_extents+0x4d7/0x6e0 fs/ocfs2/move_extents.c:1064
       ocfs2_ioctl+0x31f/0x7a0 fs/ocfs2/ioctl.c:947
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:874 [inline]
       __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7);
                               lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8
);
                               lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7);
  lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#8);

 *** DEADLOCK ***

5 locks held by syz.4.21/4421:
 #0: ffff888025c1e460
 (sb_writers#15){.+.+}-{0:0}
, at: mnt_want_write_file+0x5c/0x200 fs/namespace.c:430
 #1: ffff88805f266d88
 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: ocfs2_move_extents+0x19d/0xa40 fs/ocfs2/move_extents.c:916
 #2: ffff88805f266a20 (&oi->ip_alloc_sem){++++}-{3:3}
, at: ocfs2_move_extents+0x3fc/0xa40 fs/ocfs2/move_extents.c:936
 #3: ffff88807038ed88 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #3: ffff88807038ed88 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: ocfs2_reserve_suballoc_bits+0x16d/0x44b0 fs/ocfs2/suballoc.c:804
 #4: ffff88807038d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #4: ffff88807038d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:638 [inline]
 #4: ffff88807038d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x131f/0x3450 fs/ocfs2/move_extents.c:866

stack backtrace:
CPU: 1 PID: 4421 Comm: syz.4.21 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x2c66/0x7b50 kernel/locking/lockdep.c:5012
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 down_write+0x38/0x60 kernel/locking/rwsem.c:1551
 inode_lock include/linux/fs.h:787 [inline]
 ocfs2_move_extent fs/ocfs2/move_extents.c:646 [inline]
 __ocfs2_move_extents_range+0x1a31/0x3450 fs/ocfs2/move_extents.c:866
 ocfs2_move_extents+0x409/0xa40 fs/ocfs2/move_extents.c:938
 ocfs2_ioctl_move_extents+0x4d7/0x6e0 fs/ocfs2/move_extents.c:1064
 ocfs2_ioctl+0x31f/0x7a0 fs/ocfs2/ioctl.c:947
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f94c9725e59
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:00007f94c795d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f94c99ae090 RCX: 00007f94c9725e59
RDX: 00002000000000c0 RSI: 0000000040406f06 RDI: 0000000000000007
RBP: 00007f94c97bbe6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f94c99ae128 R14: 00007f94c99ae090 R15: 00007fff45251928
 </TASK>

Crashes (28):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/05 13:44 linux-5.15.y c86c4726e7f0 fcece630 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2026/06/30 07:11 linux-5.15.y eceeec79dbc6 fff8d0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2026/06/16 20:16 linux-5.15.y dc027a595035 a3998659 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2026/06/15 07:27 linux-5.15.y dc027a595035 1d2f3589 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2026/04/24 07:47 linux-5.15.y b9d57c40a767 9cfb3ca7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2026/04/17 14:18 linux-5.15.y 91d48252ad4b de0a551d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2026/03/12 17:46 linux-5.15.y 91d48252ad4b 4efadf07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2026/02/10 06:15 linux-5.15.y 7b232985052f 4ab09a02 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2025/12/07 16:58 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2025/11/29 10:42 linux-5.15.y cc5ec8769306 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2025/10/29 06:17 linux-5.15.y ac56c046adf4 fd2207e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2025/05/04 06:39 linux-5.15.y 16fdf2c7111b b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2025/05/04 06:19 linux-5.15.y 16fdf2c7111b b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2025/04/26 04:35 linux-5.15.y f7347f400572 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2025/03/11 15:42 linux-5.15.y c16c81c81336 16256247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in __ocfs2_move_extents_range
2025/08/26 21:29 linux-5.15.y c79648372d02 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/08/19 09:31 linux-5.15.y c79648372d02 523f460e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/08/12 21:42 linux-5.15.y c79648372d02 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/07/20 16:35 linux-5.15.y c79648372d02 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/07/01 20:15 linux-5.15.y 3dea0e7f549e 091a06cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/07/01 19:46 linux-5.15.y 3dea0e7f549e 091a06cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/06/25 23:09 linux-5.15.y 1c700860e8bc 26d77996 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/06/22 05:24 linux-5.15.y 1c700860e8bc d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/06/19 11:15 linux-5.15.y 1c700860e8bc ed3e87f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/06/14 05:47 linux-5.15.y 1c700860e8bc 0e8da31f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/05/26 03:52 linux-5.15.y 98f47d0e9b8c 2d4582d0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/05/22 23:18 linux-5.15.y 98f47d0e9b8c 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
2025/04/22 15:05 linux-5.15.y f7347f400572 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in __ocfs2_move_extents_range
* Struck through repros no longer work on HEAD.