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: 373d, last: 7d21h
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 221d 371d 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 123 11d 370d 0/3 upstream: reported on 2025/03/15 00:05
linux-6.6 possible deadlock in __ocfs2_move_extents_range 4 108 32d 265d 0/2 upstream: reported on 2025/06/27 23:37

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

but task is already holding lock:
ffff888074283488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
ffff888074283488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:638 [inline]
ffff888074283488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x137d/0x35d0 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]#6){+.+.}-{3:3}:
       down_write+0x38/0x60 kernel/locking/rwsem.c:1551
       inode_lock include/linux/fs.h:787 [inline]
       __ocfs2_flush_truncate_log+0x357/0x1110 fs/ocfs2/alloc.c:6044
       ocfs2_flush_truncate_log+0x4b/0x60 fs/ocfs2/alloc.c:6074
       ocfs2_sync_fs+0x119/0x330 fs/ocfs2/super.c:403
       sync_filesystem+0x1be/0x220 fs/sync.c:66
       generic_shutdown_super+0x6b/0x300 fs/super.c:448
       kill_block_super+0x7c/0xe0 fs/super.c:1427
       deactivate_locked_super+0x93/0xf0 fs/super.c:335
       cleanup_mnt+0x42d/0x4e0 fs/namespace.c:1148
       task_work_run+0x125/0x1a0 kernel/task_work.c:188
       tracehook_notify_resume include/linux/tracehook.h:189 [inline]
       exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
       exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214
       __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
       syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
       do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{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+0x2c42/0x7d10 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+0x1a5f/0x35d0 fs/ocfs2/move_extents.c:866
       ocfs2_move_extents+0x3ad/0x9c0 fs/ocfs2/move_extents.c:938
       ocfs2_ioctl_move_extents+0x523/0x6c0 fs/ocfs2/move_extents.c:1064
       ocfs2_ioctl+0x31f/0x7a0 fs/ocfs2/ioctl.c:931
       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]#6);
                               lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5);
                               lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6);
  lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5);

 *** DEADLOCK ***

5 locks held by syz.3.786/7850:
 #0: ffff88802b77c460 (sb_writers#17){.+.+}-{0:0}, at: mnt_want_write_file+0x5c/0x200 fs/namespace.c:430
 #1: ffff888059849808 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #1: ffff888059849808 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: ocfs2_move_extents+0x19e/0x9c0 fs/ocfs2/move_extents.c:916
 #2: ffff8880598494a0 (&oi->ip_alloc_sem){++++}-{3:3}, at: ocfs2_move_extents+0x3a0/0x9c0 fs/ocfs2/move_extents.c:936
 #3: ffff88805f57df48 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#3){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #3: ffff88805f57df48 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#3){+.+.}-{3:3}, at: ocfs2_reserve_suballoc_bits+0x16a/0x44d0 fs/ocfs2/suballoc.c:782
 #4: ffff888074283488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #4: ffff888074283488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:638 [inline]
 #4: ffff888074283488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x137d/0x35d0 fs/ocfs2/move_extents.c:866

stack backtrace:
CPU: 0 PID: 7850 Comm: syz.3.786 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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+0x2c42/0x7d10 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+0x1a5f/0x35d0 fs/ocfs2/move_extents.c:866
 ocfs2_move_extents+0x3ad/0x9c0 fs/ocfs2/move_extents.c:938
 ocfs2_ioctl_move_extents+0x523/0x6c0 fs/ocfs2/move_extents.c:1064
 ocfs2_ioctl+0x31f/0x7a0 fs/ocfs2/ioctl.c:931
 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:0x7f9a7f255799
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:00007f9a7d48e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f9a7f4cf090 RCX: 00007f9a7f255799
RDX: 00002000000000c0 RSI: 0000000040406f06 RDI: 0000000000000004
RBP: 00007f9a7f2ebc99 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f9a7f4cf128 R14: 00007f9a7f4cf090 R15: 00007ffde90f9f68
 </TASK>

Crashes (22):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.