From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.zx2c4.com (lists.zx2c4.com [165.227.139.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D7FBC25B75 for ; Wed, 15 May 2024 18:41:32 +0000 (UTC) Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 86a6f013; Wed, 15 May 2024 18:41:30 +0000 (UTC) Received: from mail-il1-f205.google.com (mail-il1-f205.google.com [209.85.166.205]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 2e8dd772 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 15 May 2024 18:41:28 +0000 (UTC) Received: by mail-il1-f205.google.com with SMTP id e9e14a558f8ab-36c89052654so87382125ab.0 for ; Wed, 15 May 2024 11:41:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715798487; x=1716403287; h=content-transfer-encoding:to:from:subject:message-id:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WX5EZnFlrIpQAeCtrJHYpc8nSed7polYaoKaA2Ch3X0=; b=mueNYq2bkcYwlDUVWRM0mOizGbFR5FiSx2HzYAwBfdryQAWlRtniUsEILB27nrPeJ3 V/dKx9HpUofN49RIBqJ+HOpBWowAw0V/vOyU5UJG72o2fboW9Q5dyT5m7DcIawz+a4GD mfB3HKwj0j+kTj9Rb44qM9z3WAfzC948ywdAn1bMuygPpAxdupnfmVB8WspznpkoS9eI KOfDiJwQdd1EUR7aB31SBBe/LNv4JPV8mE/7TVNaRM+b+Ow0lirtpX7ETj7+iWefqyB6 ihwG5c/ofAYQYWfdBB8DV2pAw5kIZWVYfTUfWsfh/sONGJbWjNZT78C7yTi8M43Qgtan F59g== X-Forwarded-Encrypted: i=1; AJvYcCUheBhPyv9pg/tHtsgynbO8QKu3xlHDlXL96o9YZoU8lz8rdiMkA/3ljVwcgvl0hKMX3jsAi+WADQ2pyBnEsehtnB2Amz9/Yww9 X-Gm-Message-State: AOJu0Yzg/k+7bFWiGRCJr2En6PrQB8jT7M+fA/2PAKS96axjfY+Da8TN Wz6ygIoEOXpSa4YT68Y3iCu5baR9tvUPbcOVWztMSy+jmaEpHGa4TTQDHx+K02vYcnW5UbicNlo EsNp2g7j/bH52smIbe+6TG6oeYvX/nfiKnS6jZ6+aMUdmnTkRQq0eoRU= X-Google-Smtp-Source: AGHT+IEcIEPIbJ6ZCE6ljJ1uiqKnpkRKk9UKeXauhWWFn2J5kMeV81Q1oAaHclHggsG4WEDehTfASC3o8xniY0CDhbVUTo/9oCzU MIME-Version: 1.0 X-Received: by 2002:a92:d190:0:b0:36d:92b9:8f30 with SMTP id e9e14a558f8ab-36d92b98fe7mr1543295ab.1.1715798486898; Wed, 15 May 2024 11:41:26 -0700 (PDT) Date: Wed, 15 May 2024 11:41:26 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000516ace0618827799@google.com> Subject: [syzbot] [wireguard?] WARNING: locking bug in try_to_wake_up From: syzbot To: Jason@zx2c4.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzkaller-bugs@googlegroups.com, wireguard@lists.zx2c4.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: wireguard@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: wireguard-bounces@lists.zx2c4.com Sender: "WireGuard" Hello, syzbot found the following issue on: HEAD commit: cf87f46fd34d Merge tag 'drm-fixes-2024-05-11' of https://g.= . git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=3D16b04970980000 kernel config: https://syzkaller.appspot.com/x/.config?x=3D6d14c12b661fb43 dashboard link: https://syzkaller.appspot.com/bug?extid=3D8aaf2df2ef0164ffe= 1fb compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debia= n) 2.40 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/1aa5ad92dfce/disk-= cf87f46f.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/67c336f7c1c7/vmlinux-= cf87f46f.xz kernel image: https://storage.googleapis.com/syzbot-assets/bb5b717bd2b8/bzI= mage-cf87f46f.xz IMPORTANT: if you fix the issue, please add the following tag to the commit= : Reported-by: syzbot+8aaf2df2ef0164ffe1fb@syzkaller.appspotmail.com =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D [ BUG: Invalid wait context ] 6.9.0-rc7-syzkaller-00183-gcf87f46fd34d #0 Not tainted ----------------------------- kworker/0:5/10404 is trying to lock: ffff8880b953e698 (iattr_mutex){+.+.}-{3:3}, at: raw_spin_rq_lock_nested+0x2= a/0x140 kernel/sched/core.c:559 other info that might help us debug this: context-{4:4} 5 locks held by kworker/0:5/10404: #0: ffff888069fd5d48 ((wq_completion)wg-crypt-wg0#12){+.+.}-{0:0}, at: pro= cess_one_work kernel/workqueue.c:3242 [inline] #0: ffff888069fd5d48 ((wq_completion)wg-crypt-wg0#12){+.+.}-{0:0}, at: pro= cess_scheduled_works+0x8e0/0x17c0 kernel/workqueue.c:3348 #1: ffffc9000a4b7d00 ((work_completion)(&({ do { const void *__vpp_verify = =3D (typeof((worker) + 0))((void *)0); (void)__vpp_verify; } while (0); ({ = unsigned long __ptr; __ptr =3D (unsigned long) ((typeof(*((worker))) *)((wo= rker))); (typeof((typeof(*((worker))) *)((worker)))) (__ptr + (((__per_cpu_= offset[(cpu)])))); }); })->work)){+.+.}-{0:0}, at: process_one_work kernel/= workqueue.c:3243 [inline] #1: ffffc9000a4b7d00 ((work_completion)(&({ do { const void *__vpp_verify = =3D (typeof((worker) + 0))((void *)0); (void)__vpp_verify; } while (0); ({ = unsigned long __ptr; __ptr =3D (unsigned long) ((typeof(*((worker))) *)((wo= rker))); (typeof((typeof(*((worker))) *)((worker)))) (__ptr + (((__per_cpu_= offset[(cpu)])))); }); })->work)){+.+.}-{0:0}, at: process_scheduled_works+= 0x91b/0x17c0 kernel/workqueue.c:3348 #2: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire inc= lude/linux/rcupdate.h:329 [inline] #2: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock includ= e/linux/rcupdate.h:781 [inline] #2: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x198/0= xef0 kernel/workqueue.c:2337 #3: ffff8880b953de18 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x6ec/0xe= f0 #4: ffff8880206b6410 (&p->pi_lock){-.-.}-{2:2}, at: class_raw_spinlock_irq= save_constructor include/linux/spinlock.h:553 [inline] #4: ffff8880206b6410 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0xb0/0x= 1470 kernel/sched/core.c:4262 stack backtrace: CPU: 0 PID: 10404 Comm: kworker/0:5 Not tainted 6.9.0-rc7-syzkaller-00183-g= cf87f46fd34d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Goo= gle 04/02/2024 Workqueue: wg-crypt-wg0 wg_packet_encrypt_worker Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_lock_invalid_wait_context kernel/locking/lockdep.c:4751 [inline] check_wait_context kernel/locking/lockdep.c:4821 [inline] __lock_acquire+0x1507/0x1fd0 kernel/locking/lockdep.c:5087 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 raw_spin_rq_lock kernel/sched/sched.h:1387 [inline] rq_lock kernel/sched/sched.h:1701 [inline] ttwu_queue kernel/sched/core.c:4055 [inline] try_to_wake_up+0x7d3/0x1470 kernel/sched/core.c:4378 kick_pool+0x45c/0x620 kernel/workqueue.c:1288 __queue_work+0xc30/0xef0 kernel/workqueue.c:2414 queue_work_on+0x14f/0x250 kernel/workqueue.c:2448 wg_queue_enqueue_per_peer_tx+0x21f/0x4b0 drivers/net/wireguard/queueing.h:= 188 wg_packet_encrypt_worker+0x1240/0x1610 drivers/net/wireguard/send.c:305 process_one_work kernel/workqueue.c:3267 [inline] process_scheduled_works+0xa12/0x17c0 kernel/workqueue.c:3348 worker_thread+0x86d/0xd70 kernel/workqueue.c:3429 kthread+0x2f2/0x390 kernel/kthread.c:388 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup