syzbot


possible deadlock in p9_req_put

Status: upstream: reported C repro on 2022/08/08 07:35
Reported-by: syzbot+50f7e8d06c3768dd97f3@syzkaller.appspotmail.com
Fix commit: 52f1c45dde91 9p: trans_fd/p9_conn_cancel: drop client lock earlier
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 182d, last: 91d

Cause bisection: introduced by (bisect log) :
commit 54283409cd162fc60480df514924ed4cb313735e
Author: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Date: Tue Jun 14 14:20:04 2022 +0000

  wifi: mac80211: Consider MLO links in offchannel logic

Crash: SYZFATAL: executor failed NUM times: executor NUM: failed to write control pipe: write |NUM: broken pipe (log)
Repro: C syz .config
Last patch testing requests:
Created Duration User Patch Repo Result
2022/08/09 10:53 18m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git ca688bff68bc OK log

Sample crash report:
============================================
WARNING: possible recursive locking detected
6.0.0-syzkaller-06475-g4c86114194e6 #0 Not tainted
--------------------------------------------
kworker/0:1/14 is trying to acquire lock:
ffff88802133ec18 (&clnt->lock){+.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline]
ffff88802133ec18 (&clnt->lock){+.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline]
ffff88802133ec18 (&clnt->lock){+.+.}-{2:2}, at: p9_req_put+0xc6/0x250 net/9p/client.c:372

but task is already holding lock:
ffff88802133ec18 (&clnt->lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
ffff88802133ec18 (&clnt->lock){+.+.}-{2:2}, at: p9_conn_cancel+0xaa/0x970 net/9p/trans_fd.c:192

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

       CPU0
       ----
  lock(&clnt->lock);
  lock(&clnt->lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

3 locks held by kworker/0:1/14:
 #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline]
 #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:636 [inline]
 #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:663 [inline]
 #0: ffff888011867d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x87a/0x1610 kernel/workqueue.c:2260
 #1: ffffc9000034fda8 ((work_completion)(&m->rq)){+.+.}-{0:0}, at: process_one_work+0x8ae/0x1610 kernel/workqueue.c:2264
 #2: ffff88802133ec18 (&clnt->lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
 #2: ffff88802133ec18 (&clnt->lock){+.+.}-{2:2}, at: p9_conn_cancel+0xaa/0x970 net/9p/trans_fd.c:192

stack backtrace:
CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 6.0.0-syzkaller-06475-g4c86114194e6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
Workqueue: events p9_read_work
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2988 [inline]
 check_deadlock kernel/locking/lockdep.c:3031 [inline]
 validate_chain kernel/locking/lockdep.c:3816 [inline]
 __lock_acquire.cold+0x116/0x3a7 kernel/locking/lockdep.c:5053
 lock_acquire kernel/locking/lockdep.c:5666 [inline]
 lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
 p9_tag_remove net/9p/client.c:367 [inline]
 p9_req_put net/9p/client.c:375 [inline]
 p9_req_put+0xc6/0x250 net/9p/client.c:372
 p9_conn_cancel+0x640/0x970 net/9p/trans_fd.c:213
 p9_read_work+0x514/0x10b0 net/9p/trans_fd.c:403
 process_one_work+0x991/0x1610 kernel/workqueue.c:2289
 worker_thread+0x665/0x1080 kernel/workqueue.c:2436
 kthread+0x2e4/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>

Crashes (2815):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-selinux-root 2022/10/08 06:16 upstream 4c86114194e6 0de35f24 .config strace log report syz C [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-kasan-gce-selinux-root 2022/10/07 13:51 upstream ffb39098bf87 8a212197 .config strace log report syz C [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-kasan-gce-selinux-root 2022/10/05 04:50 upstream a5088ee7251e eab8f949 .config strace log report syz C [disk image] [vmlinux] possible deadlock in p9_req_put
ci-qemu-upstream 2022/09/18 03:48 upstream a335366bad13 dd9a85ff .config console log report syz C possible deadlock in p9_req_put
ci-upstream-kasan-gce-selinux-root 2022/09/13 15:21 upstream e839a756012b a08652b0 .config strace log report syz C possible deadlock in p9_req_put
ci-upstream-kasan-gce-smack-root 2022/09/10 15:27 upstream ce888220d5c7 356d8217 .config strace log report syz C [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-kasan-gce-selinux-root 2022/09/10 01:08 upstream 9b4509495418 356d8217 .config strace log report syz C [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-kasan-gce-smack-root 2022/08/17 20:37 upstream 7ebfc85e2cd7 4e72d229 .config console log report syz C possible deadlock in p9_req_put
ci-upstream-kasan-gce-root 2022/08/17 15:01 upstream 7ebfc85e2cd7 4e72d229 .config strace log report syz C possible deadlock in p9_req_put
ci-upstream-kasan-gce-root 2022/08/15 16:16 upstream 7ebfc85e2cd7 8dfcaa3d .config strace log report syz C possible deadlock in p9_req_put
ci-qemu-upstream 2022/08/15 13:14 upstream 568035b01cfb 8dfcaa3d .config console log report syz C possible deadlock in p9_req_put
ci-upstream-kasan-gce-root 2022/08/15 07:29 upstream 7ebfc85e2cd7 8dfcaa3d .config strace log report syz C possible deadlock in p9_req_put
ci-upstream-kasan-gce-root 2022/08/15 04:45 upstream 7ebfc85e2cd7 8dfcaa3d .config strace log report syz C possible deadlock in p9_req_put
ci-upstream-kasan-gce-root 2022/08/12 21:53 upstream 7ebfc85e2cd7 402cd70d .config strace log report syz C possible deadlock in p9_req_put
ci-upstream-linux-next-kasan-gce-root 2022/08/08 14:13 linux-next ca688bff68bc 88e3a122 .config strace log report syz C possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/09/15 01:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a6b443748715 b884348d .config console log report syz C possible deadlock in p9_req_put
ci-upstream-kasan-gce-smack-root 2022/10/02 10:59 upstream b357fd1c2afc feb56351 .config console log report syz [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-kasan-gce-smack-root 2022/08/28 18:34 upstream 10d4879f9ef0 07177916 .config console log report syz possible deadlock in p9_req_put
ci-upstream-kasan-gce-selinux-root 2022/08/28 03:07 upstream e022620b5d05 07177916 .config strace log report syz possible deadlock in p9_req_put
ci-upstream-linux-next-kasan-gce-root 2022/08/22 22:14 linux-next 8755ae45a9e8 26a13b38 .config console log report syz possible deadlock in p9_req_put
ci-upstream-kasan-gce-smack-root 2022/10/08 08:21 upstream 4c86114194e6 0de35f24 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-kasan-gce-root 2022/10/07 16:13 upstream 4c86114194e6 8a212197 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-qemu-upstream 2022/10/07 12:03 upstream 4c86114194e6 79a59635 .config console log report info possible deadlock in p9_req_put
ci-qemu-upstream-386 2022/10/07 18:39 upstream 4c86114194e6 79a59635 .config console log report info possible deadlock in p9_req_put
ci-upstream-linux-next-kasan-gce-root 2022/08/08 07:06 linux-next ca688bff68bc 88e3a122 .config console log report info possible deadlock in p9_req_put
ci-upstream-linux-next-kasan-gce-root 2022/08/08 05:38 linux-next ca688bff68bc 88e3a122 .config console log report info possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/07 00:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 6d752409 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/06 12:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 6d752409 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/05 23:59 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 6d752409 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/04 16:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 6d752409 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/04 15:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 6d752409 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/04 06:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 6d752409 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/04 00:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 6d752409 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/03 23:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 6d752409 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/03 11:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 7a2ebf95 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/03 08:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 7a2ebf95 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/02 18:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 08977f5d .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/02 10:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 edac4fd1 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/02 05:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 edac4fd1 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/01 18:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 edac4fd1 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/01 09:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 a1d8560a .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/11/01 03:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 a1d8560a .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/31 11:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 2a71366b .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/31 01:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 2a71366b .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/30 12:40 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 2a71366b .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/30 00:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 2a71366b .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/29 15:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 899d812a .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/29 07:40 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 899d812a .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/29 03:04 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 ea12ae9b .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/28 21:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 ea12ae9b .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/28 02:04 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 86777b7f .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/27 23:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 86777b7f .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/27 21:45 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 86777b7f .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/27 17:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 86777b7f .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/26 23:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 86777b7f .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/26 20:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 2159e4d2 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/26 17:42 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 2159e4d2 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/26 13:28 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 2159e4d2 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/26 02:40 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 1984aebd .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/25 22:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 1984aebd .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/25 13:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 45645420 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/25 05:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 45645420 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/24 16:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 ff2fe65d .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/23 07:03 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 p9_req_put
ci-upstream-gce-arm64 2022/10/23 01:40 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 p9_req_put
ci-upstream-gce-arm64 2022/10/22 06:55 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 p9_req_put
ci-upstream-gce-arm64 2022/10/21 22:47 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 4bfd3c27 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/21 12:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 4bfd3c27 .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/21 06:49 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 p9_req_put
ci-upstream-gce-arm64 2022/10/21 01:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 a0fd4dab .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/20 18:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 a0fd4dab .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
ci-upstream-gce-arm64 2022/10/20 14:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 b31320fc .config console log report info [disk image] [vmlinux] possible deadlock in p9_req_put
* Struck through repros no longer work on HEAD.