syzbot


possible deadlock in pipe_write

Status: upstream: reported C repro on 2022/03/21 02:34
Reported-by: syzbot+011e4ea1da6692cf881c@syzkaller.appspotmail.com
First crash: 321d, last: 7d19h

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: possible deadlock in pipe_write (log)
Repro: C syz .config

Sample crash report:
============================================
WARNING: possible recursive locking detected
6.2.0-rc1-syzkaller #0 Not tainted
--------------------------------------------
syz-executor243/5058 is trying to acquire lock:
ffff8880245fc868 (&pipe->mutex/1){+.+.}-{3:3}, at: __pipe_lock fs/pipe.c:103 [inline]
ffff8880245fc868 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_write+0x12b/0x1aa0 fs/pipe.c:431

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

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-executor243/5058:
 #0: ffff8880245fc468 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock_nested fs/pipe.c:82 [inline]
 #0: ffff8880245fc468 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_lock fs/pipe.c:90 [inline]
 #0: ffff8880245fc468 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_wait_readable+0x3d7/0x550 fs/pipe.c:1049

stack backtrace:
CPU: 1 PID: 5058 Comm: syz-executor243 Not tainted 6.2.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2990 [inline]
 check_deadlock kernel/locking/lockdep.c:3033 [inline]
 validate_chain+0x4721/0x6470 kernel/locking/lockdep.c:3818
 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055
 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668
 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 __pipe_lock fs/pipe.c:103 [inline]
 pipe_write+0x12b/0x1aa0 fs/pipe.c:431
 do_iter_write+0x6f0/0xc50 fs/read_write.c:861
 iter_file_splice_write+0x830/0xff0 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 do_splice+0x1105/0x1930 fs/splice.c:1074
 __do_splice fs/splice.c:1139 [inline]
 __do_sys_splice fs/splice.c:1346 [inline]
 __se_sys_splice+0x2a8/0x410 fs/splice.c:1328
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f1f76a108e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1f769c2308 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f1f76a98408 RCX: 00007f1f76a108e9
RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f1f76a98400 R08: 0000000000000006 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1f76a66064
R13: 00007ffeca37fcff R14: 00007f1f769c2400 R15: 0000000000022000
 </TASK>

Crashes (86):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-smack-root 2022/12/27 11:34 upstream 1b929c02afd3 9da18ae8 .config strace log report syz C [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/09/16 00:47 upstream 3245cb65fd91 dd9a85ff .config strace log report syz C [disk image] [vmlinux] possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/08/18 16:01 upstream 274a2eebf80c d58e263f .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/08/18 15:39 upstream 274a2eebf80c d58e263f .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/08/18 15:07 upstream 274a2eebf80c d58e263f .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/08/18 14:46 upstream 274a2eebf80c d58e263f .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/07/24 16:36 upstream 515f71412bb7 22343af4 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/07/24 15:56 upstream 515f71412bb7 22343af4 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/07/24 15:38 upstream 515f71412bb7 22343af4 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/07/21 02:57 upstream 353f7988dd84 88cb1383 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/06/11 19:56 upstream fe43c0188911 0d5abf15 .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/06/07 09:10 upstream e71e60cd74df c8857892 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/06/07 08:34 upstream e71e60cd74df c8857892 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/06/07 07:43 upstream e71e60cd74df c8857892 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/03/17 04:11 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/03/17 03:52 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/03/17 03:31 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/03/17 03:11 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/03/17 02:45 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/03/17 02:42 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/03/17 02:40 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/03/17 02:39 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-linux-next-kasan-gce-root 2022/07/16 20:55 linux-next cb71b93c2dc3 95cb00d1 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-linux-next-kasan-gce-root 2022/07/16 20:35 linux-next cb71b93c2dc3 95cb00d1 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-linux-next-kasan-gce-root 2022/07/16 20:14 linux-next cb71b93c2dc3 95cb00d1 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-linux-next-kasan-gce-root 2022/07/16 20:03 linux-next cb71b93c2dc3 95cb00d1 .config strace log report syz C possible deadlock in pipe_write
ci-upstream-linux-next-kasan-gce-root 2022/03/17 02:44 linux-next 91265a6da44d dfa9a8ed .config console log report syz C possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2023/01/24 20:40 upstream 7bf70dbb1882 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2023/01/15 20:27 upstream 5dc4c995db9e a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2023/01/06 01:48 upstream 41c03ba9beea 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/12/28 10:02 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/12/27 10:47 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/12/12 04:23 upstream 830b3c68c1fb 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/11/19 02:10 upstream 84368d882b96 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/11/07 03:50 upstream 089d1c31224e 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/09/30 00:58 upstream 511cce163b75 1d385642 .config console log report info [disk image] [vmlinux] possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/09/28 20:46 upstream 49c13ed0316d e2556bc3 .config console log report info [disk image] [vmlinux] possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/09/27 08:18 upstream 3800a713b607 10323ddf .config console log report info [disk image] [vmlinux] possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/09/26 05:14 upstream f76349cf4145 0042f2b4 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/09/19 05:44 upstream 38eddeedbbea dd9a85ff .config console log report info [disk image] [vmlinux] possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/09/17 21:53 upstream a335366bad13 dd9a85ff .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/08/28 22:05 upstream 10d4879f9ef0 07177916 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/08/19 08:11 upstream 3b06a2755758 26a13b38 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/08/11 10:17 upstream 200e340f2196 a6201f11 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/08/09 15:25 upstream 200e340f2196 da700653 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/06/29 13:20 upstream 941e3e791269 496a8536 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/06/26 22:03 upstream 0840a7914caa a371c43c .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/06/24 18:54 upstream 92f20ff72066 a5dbd430 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/06/18 04:31 upstream f0ec9c65a8d6 cb58b3b2 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/06/18 01:07 upstream f0ec9c65a8d6 cb58b3b2 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/06/01 20:14 upstream 700170bf6b4d 3666edfe .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/05/31 06:27 upstream 2c5ca23f7414 af70c3a9 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/05/17 14:41 upstream 42226c989789 744a39e2 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/04/28 12:54 upstream 8f4dd16603ce 8a1f1f07 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/04/24 18:24 upstream 22da5264abf4 131df97d .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/04/15 02:17 upstream b9b4c79e5830 b17b2923 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/04/02 06:57 upstream 8467b0ed6ce3 79a2a8fc .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/03/19 07:53 upstream 34e047aa16c0 e2d91b1d .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/03/17 03:51 upstream 56e337f2cf13 dfa9a8ed .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-root 2022/03/17 02:35 upstream 56e337f2cf13 dfa9a8ed .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-selinux-root 2022/03/17 02:30 upstream 56e337f2cf13 dfa9a8ed .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-smack-root 2022/03/17 02:29 upstream 56e337f2cf13 dfa9a8ed .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce 2022/03/17 02:28 upstream 56e337f2cf13 dfa9a8ed .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-386 2022/07/16 03:18 upstream 9b59ec8d50a1 95cb00d1 .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-386 2022/04/14 18:24 upstream a19944809fe9 b17b2923 .config console log report info possible deadlock in pipe_write
ci-qemu-upstream-386 2022/03/17 15:24 upstream 56e337f2cf13 dfa9a8ed .config console log report info possible deadlock in pipe_write
ci-upstream-kasan-gce-386 2022/03/17 02:59 upstream 56e337f2cf13 dfa9a8ed .config console log report info possible deadlock in pipe_write
ci-upstream-linux-next-kasan-gce-root 2022/08/12 16:01 linux-next 6c8f479764eb 402cd70d .config console log report info possible deadlock in pipe_write
ci-upstream-linux-next-kasan-gce-root 2022/06/11 04:45 linux-next 6d0c80680317 0d5abf15 .config console log report info possible deadlock in pipe_write
ci-upstream-linux-next-kasan-gce-root 2022/03/17 02:32 linux-next 91265a6da44d dfa9a8ed .config console log report info possible deadlock in pipe_write
ci-upstream-gce-arm64 2023/01/19 03:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9598c377d828 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2023/01/07 07:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ae87308093bc 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2023/01/04 02:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/12/30 08:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/12/29 08:14 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/12/04 01:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e3cb714fb489 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/11/24 12:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 65762d97e6fa 12c66417 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/11/13 14:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1621b6eaebf7 3ead01ad .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/11/10 07:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1621b6eaebf7 b2488a87 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/10/22 12:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 c0b80a55 .config console log report info [disk image] [vmlinux] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/10/21 10:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 63e790dd .config console log report info [disk image] [vmlinux] possible deadlock in pipe_write
ci-upstream-gce-arm64 2022/09/17 04:59 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a6b443748715 dd9a85ff .config console log report info [disk image] [vmlinux] possible deadlock in pipe_write
* Struck through repros no longer work on HEAD.