syzbot


possible deadlock in iter_file_splice_write (4)

Status: closed as dup on 2024/06/05 11:05
Subsystems: overlayfs
[Documentation on labels]
Reported-by: syzbot+5ce16f43e888965f009d@syzkaller.appspotmail.com
First crash: 454d, last: 22d
Duplicate of
Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported
possible deadlock in kernfs_seq_start kernfs 4 C done 23 21d 489d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [overlayfs?] possible deadlock in iter_file_splice_write (4) 1 (2) 2024/06/05 11:05
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in iter_file_splice_write (3) overlayfs 4 24 491d 533d 0/29 closed as dup on 2024/03/14 09:27
linux-5.15 possible deadlock in iter_file_splice_write (3) 4 1 1d21h 1d21h 0/3 upstream: reported on 2025/08/27 15:45
upstream possible deadlock in iter_file_splice_write overlayfs 4 1 1822d 1818d 0/29 auto-closed as invalid on 2020/12/30 21:45
upstream possible deadlock in iter_file_splice_write (2) overlayfs 4 C done 2 1496d 1492d 0/29 closed as dup on 2021/07/28 14:57
linux-5.15 possible deadlock in iter_file_splice_write (2) 4 1 136d 136d 0/3 auto-obsoleted due to no activity on 2025/07/24 12:07
linux-5.15 possible deadlock in iter_file_splice_write 4 1 308d 308d 0/3 auto-obsoleted due to no activity on 2025/02/01 14:50

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.16.0-syzkaller #0 Not tainted
------------------------------------------------------
syz.8.2143/13330 is trying to acquire lock:
ffff888056be1468 (&pipe->mutex){+.+.}-{4:4}, at: iter_file_splice_write+0x1e6/0x1000 fs/splice.c:683

but task is already holding lock:
ffff8880340f4428 (sb_writers#5){.+.+}-{0:0}, at: do_splice+0xbff/0x1660 fs/splice.c:1347

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (sb_writers#5){.+.+}-{0:0}:
       lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
       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.h:1795 [inline]
       sb_start_write+0x4d/0x1c0 include/linux/fs.h:1931
       mnt_want_write+0x41/0x90 fs/namespace.c:557
       ovl_create_object+0xfc/0x310 fs/overlayfs/dir.c:628
       lookup_open fs/namei.c:3717 [inline]
       open_last_lookups fs/namei.c:3816 [inline]
       path_openat+0x14f4/0x3830 fs/namei.c:4052
       do_filp_open+0x1fa/0x410 fs/namei.c:4082
       do_sys_openat2+0x121/0x1c0 fs/open.c:1437
       do_sys_open fs/open.c:1452 [inline]
       __do_sys_open fs/open.c:1460 [inline]
       __se_sys_open fs/open.c:1456 [inline]
       __x64_sys_open+0x11e/0x150 fs/open.c:1456
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #2 (&ovl_i_mutex_dir_key[depth]){++++}-{4:4}:
       lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
       down_read+0x46/0x2e0 kernel/locking/rwsem.c:1524
       inode_lock_shared include/linux/fs.h:884 [inline]
       lookup_slow+0x46/0x70 fs/namei.c:1833
       walk_component+0x2d2/0x400 fs/namei.c:2138
       lookup_last fs/namei.c:2639 [inline]
       path_lookupat+0x163/0x430 fs/namei.c:2663
       filename_lookup+0x212/0x570 fs/namei.c:2692
       kern_path+0x35/0x50 fs/namei.c:2825
       lookup_bdev+0xc0/0x280 block/bdev.c:1205
       resume_store+0x169/0x460 kernel/power/hibernate.c:1269
       kernfs_fop_write_iter+0x378/0x4f0 fs/kernfs/file.c:334
       new_sync_write fs/read_write.c:593 [inline]
       vfs_write+0x54b/0xa90 fs/read_write.c:686
       ksys_write+0x145/0x250 fs/read_write.c:738
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&of->mutex){+.+.}-{4:4}:
       lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
       __mutex_lock_common kernel/locking/mutex.c:602 [inline]
       __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747
       kernfs_fop_write_iter+0x1e0/0x4f0 fs/kernfs/file.c:325
       iter_file_splice_write+0x937/0x1000 fs/splice.c:738
       do_splice_from fs/splice.c:935 [inline]
       do_splice+0xc79/0x1660 fs/splice.c:1348
       __do_splice fs/splice.c:1430 [inline]
       __do_sys_splice fs/splice.c:1633 [inline]
       __se_sys_splice+0x2e1/0x460 fs/splice.c:1615
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&pipe->mutex){+.+.}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3168 [inline]
       check_prevs_add kernel/locking/lockdep.c:3287 [inline]
       validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911
       __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240
       lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
       __mutex_lock_common kernel/locking/mutex.c:602 [inline]
       __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747
       iter_file_splice_write+0x1e6/0x1000 fs/splice.c:683
       do_splice_from fs/splice.c:935 [inline]
       do_splice+0xc79/0x1660 fs/splice.c:1348
       __do_splice fs/splice.c:1430 [inline]
       __do_sys_splice fs/splice.c:1633 [inline]
       __se_sys_splice+0x2e1/0x460 fs/splice.c:1615
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &pipe->mutex --> &ovl_i_mutex_dir_key[depth] --> sb_writers#5

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(sb_writers#5);
                               lock(&ovl_i_mutex_dir_key[depth]);
                               lock(sb_writers#5);
  lock(&pipe->mutex);

 *** DEADLOCK ***

1 lock held by syz.8.2143/13330:
 #0: ffff8880340f4428 (sb_writers#5){.+.+}-{0:0}, at: do_splice+0xbff/0x1660 fs/splice.c:1347

stack backtrace:
CPU: 0 UID: 0 PID: 13330 Comm: syz.8.2143 Not tainted 6.16.0-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2046
 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2178
 check_prev_add kernel/locking/lockdep.c:3168 [inline]
 check_prevs_add kernel/locking/lockdep.c:3287 [inline]
 validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911
 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240
 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
 __mutex_lock_common kernel/locking/mutex.c:602 [inline]
 __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747
 iter_file_splice_write+0x1e6/0x1000 fs/splice.c:683
 do_splice_from fs/splice.c:935 [inline]
 do_splice+0xc79/0x1660 fs/splice.c:1348
 __do_splice fs/splice.c:1430 [inline]
 __do_sys_splice fs/splice.c:1633 [inline]
 __se_sys_splice+0x2e1/0x460 fs/splice.c:1615
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f014d78e9a9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f014e5c4038 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f014d9b5fa0 RCX: 00007f014d78e9a9
RDX: 0000000000000007 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f014d810d69 R08: 0000000000001000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f014d9b5fa0 R15: 00007ffff49b4ab8
 </TASK>

Crashes (35):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/30 04:42 upstream 038d61fd6422 f8f2b4da .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2025/07/21 20:21 upstream 89be9a83ccf1 0b3788a0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in iter_file_splice_write
2025/07/19 14:18 upstream 4871b7cb27f4 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2025/07/19 05:07 upstream d786aba32000 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2025/07/16 09:34 upstream 155a3c003e55 124ec9cc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2025/04/26 23:46 upstream 5bc1018675ec c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2025/04/24 16:15 upstream a79be02bba5c 9882047a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2025/02/24 04:45 upstream d082ecbc71e9 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in iter_file_splice_write
2024/12/13 20:21 upstream f932fb9b4074 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/12/13 03:58 upstream 150b567e0d57 3547e30f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/11/25 07:56 upstream 9f16d5e6f220 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/11/23 08:26 upstream 06afb0f36106 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/11/23 08:18 upstream 06afb0f36106 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/11/14 19:33 upstream 0a9b9d17f3a7 77f3eeb7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/11/10 18:44 upstream de2f378f2b77 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/11/04 05:20 upstream b9021de3ec2f f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/11/02 02:22 upstream 6c52d4da1c74 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/09/12 20:31 upstream 77f587896757 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/09/10 16:28 upstream bc83b4d1f086 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/09/10 16:16 upstream bc83b4d1f086 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/08/24 14:54 upstream d2bafcf224f3 d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in iter_file_splice_write
2024/06/18 07:55 upstream 2ccbdf43d5e7 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/06/17 02:29 upstream 2ccbdf43d5e7 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/06/06 03:36 upstream 2df0193e62cf 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/06/06 01:20 upstream 71d7b52cc33b 5aa1a7c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/06/05 21:34 upstream 71d7b52cc33b 5aa1a7c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/06/05 00:36 upstream 32f88d65f01b e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/06/04 00:37 upstream f06ce441457d a1feae05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/06/03 16:09 upstream c3f38fa61af7 0aba2352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/06/02 15:18 upstream 83814698cf48 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/05/31 22:40 upstream d8ec19857b09 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2024/05/31 18:46 upstream 4a4be1ad3a6e 0c378259 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in iter_file_splice_write
2025/08/07 06:45 linux-next b7d4e259682c 4bd24a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce possible deadlock in iter_file_splice_write
2025/06/01 14:26 linux-next 3a83b350b5be 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in iter_file_splice_write
2025/02/23 07:01 linux-next e5d3fd687aac d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in iter_file_splice_write
* Struck through repros no longer work on HEAD.