syzbot
possible deadlock in anon_pipe_write (3)
Status:
upstream: reported on 2026/08/15 00:11
Subsystems:
autofs
[Documentation on labels]
Reported-by: syzbot+c36cbd4737e4508de101@syzkaller.appspotmail.com
First crash: 49d, last: 8d06h
Sample crash report:
autofs4:pid:6068:autofs_mount_wait: waiting for mount name=0x0000000004000921
autofs4:pid:6068:autofs_wait: new wait id = 0x00000001, name = 0x0000000004000921, nfy=1
autofs4:pid:6068:autofs_notify_daemon: wait id = 0x00000001, name = 0x0000000004000921, type=3
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.3.83/6068 is trying to acquire lock:
ffff888078c95860 (&pipe->mutex){+.+.}-{4:4}, at: anon_pipe_prefill_and_lock fs/pipe.c:165 [inline]
ffff888078c95860 (&pipe->mutex){+.+.}-{4:4}, at: anon_pipe_write+0x28f/0x1a30 fs/pipe.c:534
but task is already holding lock:
ffff88803494a138 (&sbi->pipe_mutex){+.+.}-{4:4}, at: autofs_write fs/autofs/waitq.c:55 [inline]
ffff88803494a138 (&sbi->pipe_mutex){+.+.}-{4:4}, at: autofs_notify_daemon+0x72a/0xe80 fs/autofs/waitq.c:164
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&sbi->pipe_mutex){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
autofs_write fs/autofs/waitq.c:55 [inline]
autofs_notify_daemon+0x72a/0xe80 fs/autofs/waitq.c:164
autofs_wait+0x11bd/0x1880 fs/autofs/waitq.c:426
autofs_mount_wait+0x16b/0x390 fs/autofs/root.c:256
autofs_d_automount+0x64e/0x810 fs/autofs/root.c:410
follow_automount fs/namei.c:1565 [inline]
__traverse_mounts+0x2fe/0x5d0 fs/namei.c:1618
traverse_mounts fs/namei.c:1647 [inline]
handle_mounts fs/namei.c:1749 [inline]
step_into_slowpath+0x4ba/0x820 fs/namei.c:2104
step_into fs/namei.c:2152 [inline]
walk_component fs/namei.c:2288 [inline]
lookup_last fs/namei.c:2789 [inline]
path_lookupat+0x433/0x8c0 fs/namei.c:2813
filename_lookup+0x265/0x5d0 fs/namei.c:2842
kern_path+0x3d/0x150 fs/namei.c:3036
lookup_bdev+0xc8/0x2b0 block/bdev.c:1268
resume_store+0x16f/0x4f0 kernel/power/hibernate.c:1278
kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:687
ksys_write+0x150/0x270 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (&of->mutex){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
kernfs_fop_write_iter+0x1d8/0x540 fs/kernfs/file.c:336
iter_file_splice_write+0xa31/0x1240 fs/splice.c:736
do_splice_from fs/splice.c:936 [inline]
do_splice+0xf14/0x1970 fs/splice.c:1349
__do_splice fs/splice.c:1431 [inline]
__do_sys_splice fs/splice.c:1634 [inline]
__se_sys_splice+0x353/0x490 fs/splice.c:1616
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&pipe->mutex){+.+.}-{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
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
anon_pipe_prefill_and_lock fs/pipe.c:165 [inline]
anon_pipe_write+0x28f/0x1a30 fs/pipe.c:534
__kernel_write_iter+0x44a/0x8f0 fs/read_write.c:621
__kernel_write+0x106/0x170 fs/read_write.c:641
autofs_write fs/autofs/waitq.c:57 [inline]
autofs_notify_daemon+0x73d/0xe80 fs/autofs/waitq.c:164
autofs_wait+0x11bd/0x1880 fs/autofs/waitq.c:426
autofs_mount_wait+0x16b/0x390 fs/autofs/root.c:256
autofs_d_automount+0x64e/0x810 fs/autofs/root.c:410
follow_automount fs/namei.c:1565 [inline]
__traverse_mounts+0x2fe/0x5d0 fs/namei.c:1618
traverse_mounts fs/namei.c:1647 [inline]
handle_mounts fs/namei.c:1749 [inline]
step_into_slowpath+0x4ba/0x820 fs/namei.c:2104
step_into fs/namei.c:2152 [inline]
walk_component fs/namei.c:2288 [inline]
lookup_last fs/namei.c:2789 [inline]
path_lookupat+0x433/0x8c0 fs/namei.c:2813
filename_lookup+0x265/0x5d0 fs/namei.c:2842
kern_path+0x3d/0x150 fs/namei.c:3036
lookup_bdev+0xc8/0x2b0 block/bdev.c:1268
resume_store+0x16f/0x4f0 kernel/power/hibernate.c:1278
kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:687
ksys_write+0x150/0x270 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Chain exists of:
&pipe->mutex --> &of->mutex --> &sbi->pipe_mutex
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&sbi->pipe_mutex);
lock(&of->mutex);
lock(&sbi->pipe_mutex);
lock(&pipe->mutex);
*** DEADLOCK ***
locks held by syz.3.83/6068: 5, last CPU#0:
#0: ffff888032f5eef0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x246/0x320 fs/file.c:1259
#1: ffff88807fe2e460 (sb_writers#7){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2753 [inline]
#1: ffff88807fe2e460 (sb_writers#7){.+.+}-{0:0}, at: vfs_write+0x22b/0xba0 fs/read_write.c:683
#2: ffff88806680b480 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1d8/0x540 fs/kernfs/file.c:336
#3: ffff88801f29a1e8 (kn->active#60){.+.+}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:73 [inline]
#3: ffff88801f29a1e8 (kn->active#60){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22b/0x540 fs/kernfs/file.c:337
#4: ffff88803494a138 (&sbi->pipe_mutex){+.+.}-{4:4}, at: autofs_write fs/autofs/waitq.c:55 [inline]
#4: ffff88803494a138 (&sbi->pipe_mutex){+.+.}-{4:4}, at: autofs_notify_daemon+0x72a/0xe80 fs/autofs/waitq.c:164
stack backtrace:
CPU: 0 UID: 0 PID: 6068 Comm: syz.3.83 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2026
Call Trace:
<TASK>
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
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
anon_pipe_prefill_and_lock fs/pipe.c:165 [inline]
anon_pipe_write+0x28f/0x1a30 fs/pipe.c:534
__kernel_write_iter+0x44a/0x8f0 fs/read_write.c:621
__kernel_write+0x106/0x170 fs/read_write.c:641
autofs_write fs/autofs/waitq.c:57 [inline]
autofs_notify_daemon+0x73d/0xe80 fs/autofs/waitq.c:164
autofs_wait+0x11bd/0x1880 fs/autofs/waitq.c:426
autofs_mount_wait+0x16b/0x390 fs/autofs/root.c:256
autofs_d_automount+0x64e/0x810 fs/autofs/root.c:410
follow_automount fs/namei.c:1565 [inline]
__traverse_mounts+0x2fe/0x5d0 fs/namei.c:1618
traverse_mounts fs/namei.c:1647 [inline]
handle_mounts fs/namei.c:1749 [inline]
step_into_slowpath+0x4ba/0x820 fs/namei.c:2104
step_into fs/namei.c:2152 [inline]
walk_component fs/namei.c:2288 [inline]
lookup_last fs/namei.c:2789 [inline]
path_lookupat+0x433/0x8c0 fs/namei.c:2813
filename_lookup+0x265/0x5d0 fs/namei.c:2842
kern_path+0x3d/0x150 fs/namei.c:3036
lookup_bdev+0xc8/0x2b0 block/bdev.c:1268
resume_store+0x16f/0x4f0 kernel/power/hibernate.c:1278
kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:687
ksys_write+0x150/0x270 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f413639e159
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:00007f41371e4028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f4136625fa0 RCX: 00007f413639e159
RDX: 0000000000000012 RSI: 0000200000000040 RDI: 0000000000000009
RBP: 00007f413643506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4136626038 R14: 00007f4136625fa0 R15: 00007ffcae5b87f8
</TASK>
autofs4:pid:6068:autofs_mount_wait: mount wait done status=-2
autofs4:pid:6068:autofs_dentry_release: releasing ffff88805196b8f8
PM: hibernation: Configured hibernation resume from disk to 9453601
PM: hibernation: Hibernation image partition 9:16417 present
PM: hibernation: Looking for hibernation image.
PM: Image not found (code -6)
PM: hibernation: Hibernation image not present or could not be loaded.
kcov: kcov_task_exit: t = ffff88801ef8ddc0, kcov->t = ffff88801ef8ddc0
* Struck through repros no longer work on HEAD.