syzbot


possible deadlock in pipe_write

Status: upstream: reported C repro on 2023/04/03 17:51
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+00ef6e8711d8fe2c15bd@syzkaller.appspotmail.com
First crash: 442d, last: 71d
Bug presence (3)
Date Name Commit Repro Result
2023/09/07 linux-6.1.y (ToT) 59b13c2b647e C [report] possible deadlock in pipe_write
2023/06/09 upstream (ToT) 33f2b5785a2b C [report] possible deadlock in pipe_write
2023/09/07 upstream (ToT) 7ba2090ca64e C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in pipe_write missing-backport origin:lts-only C done 106 71d 386d 0/3 upstream: reported C repro on 2023/05/30 03:04
upstream possible deadlock in pipe_write fs C inconclusive 181 142d 821d 26/27 fixed on 2024/01/30 15:47
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/09/20 15:19 1h27m fix candidate upstream job log (0)

Sample crash report:
============================================
WARNING: possible recursive locking detected
6.1.83-syzkaller #0 Not tainted
--------------------------------------------
syz-executor124/4221 is trying to acquire lock:
ffff0000d8fe6c68 (&pipe->mutex/1){+.+.}-{3:3}, at: __pipe_lock fs/pipe.c:103 [inline]
ffff0000d8fe6c68 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_write+0x114/0x1990 fs/pipe.c:431

but task is already holding lock:
ffff0000d8fe7068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock_nested fs/pipe.c:82 [inline]
ffff0000d8fe7068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock+0x68/0x98 fs/pipe.c:90

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&pipe->mutex/1);
  lock(&pipe->mutex/1);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

1 lock held by syz-executor124/4221:
 #0: ffff0000d8fe7068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock_nested fs/pipe.c:82 [inline]
 #0: ffff0000d8fe7068 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock+0x68/0x98 fs/pipe.c:90

stack backtrace:
CPU: 1 PID: 4221 Comm: syz-executor124 Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 __lock_acquire+0x6310/0x7680 kernel/locking/lockdep.c:5049
 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662
 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
 __pipe_lock fs/pipe.c:103 [inline]
 pipe_write+0x114/0x1990 fs/pipe.c:431
 do_iter_write+0x534/0x964 fs/read_write.c:861
 vfs_iter_write+0x88/0xac fs/read_write.c:902
 iter_file_splice_write+0x62c/0xc5c fs/splice.c:685
 do_splice_from fs/splice.c:763 [inline]
 do_splice+0xfd0/0x1898 fs/splice.c:1102
 __do_splice fs/splice.c:1167 [inline]
 __do_sys_splice fs/splice.c:1374 [inline]
 __se_sys_splice fs/splice.c:1356 [inline]
 __arm64_sys_splice+0x50c/0x7fc fs/splice.c:1356
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/02 03:30 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2024/03/21 15:58 linux-6.1.y d7543167affd 6753db5c .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2023/12/02 23:18 linux-6.1.y 6ac30d748bb0 f819d6f7 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2023/06/09 02:28 linux-6.1.y 76ba310227d2 058b3a5a .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2023/08/15 06:16 linux-6.1.y 1321ab403b38 39990d51 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/07/03 03:06 linux-6.1.y 0f4ac6b4c5f0 bfc47836 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/06/18 16:23 linux-6.1.y ca87e77a2ef8 f3921d4d .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/04/08 16:11 linux-6.1.y 347385861c50 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/04/08 16:07 linux-6.1.y 347385861c50 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/04/04 15:08 linux-6.1.y 347385861c50 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/04/02 12:33 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/03/29 10:27 linux-6.1.y e5cd595e23c1 c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/02/22 16:31 linux-6.1.y 8b4118fabd6e 345111b5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/02/17 17:48 linux-6.1.y 8b4118fabd6e 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/01/26 21:12 linux-6.1.y 883d1a956208 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/01/23 23:07 linux-6.1.y 8fd7f4462453 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/12/18 08:01 linux-6.1.y ba6f5fb46511 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/12/05 23:18 linux-6.1.y c6114c845984 858d62d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/11/11 00:57 linux-6.1.y fb2635ac69ab d80eec66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/10/27 16:57 linux-6.1.y 32c9cdbe383c 3c418d72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/10/23 17:39 linux-6.1.y 7d24402875c7 989a3687 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/09/02 14:25 linux-6.1.y c2cbfe5f5122 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2024/03/21 15:34 linux-6.1.y d7543167affd 6753db5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2024/01/03 02:38 linux-6.1.y a507f147e6f0 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2023/12/26 07:37 linux-6.1.y 4aa6747d9352 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2023/12/16 20:13 linux-6.1.y ba6f5fb46511 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2023/12/02 23:04 linux-6.1.y 6ac30d748bb0 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2023/08/24 01:13 linux-6.1.y 802aacbbffe2 b81ca3f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/06/28 14:31 linux-6.1.y a1c449d00ff8 4cd5bb25 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in pipe_write
2023/06/09 02:05 linux-6.1.y 76ba310227d2 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
2023/04/03 17:51 linux-6.1.y 3b29299e5f60 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in pipe_write
* Struck through repros no longer work on HEAD.