Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1916024pxb; Wed, 2 Feb 2022 15:52:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgyOPBii18iDa49k5G03hVWtB89SaCjbJxAg8453U9lIhx0JFZ2Xu5dSje8tAHcg9t4Ria X-Received: by 2002:a17:907:2d8d:: with SMTP id gt13mr27840065ejc.583.1643845933974; Wed, 02 Feb 2022 15:52:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643845933; cv=none; d=google.com; s=arc-20160816; b=SPVY64PemHHUfgAJPXVS9COXxQqf+vgmea1PNbtchwSyWTUHIAdLFayJ6DKF7bhfZ+ bPFENWj5pjYzj9Tctqhos+zM+8X+Ztr34nhESadLIk0jRdYlGWjBEFwtNAFK2gtdN9q1 YS4rI1/+Jk8DK9b2NgVXRQIBR2FJ0RkjLBwP64/quXt69/576mzMPb7u8X60jPGyP6r3 tyUvrAHzjRJuholO45iqdb3EER+eG3XvU2Hx9Vme5EEuqSI9ETFIyKZaycItCekEt5K6 B2TaI+a7bfU/jHwrFG3nHL3RKgv1YK14OEXrh4zXEXbyQjINk4kCGQk4RarXkvoRnPRQ m2hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:in-reply-to:date :mime-version; bh=TNl+o4xe1hTSGSvtmbeiUvDNfb+TUX8jFchFwMWN6ps=; b=kWh/a9XXvk9+rrqGRiXwU5oiFDz9LVCBkv8Tr8tfHoPDJ0dm3hmvLSnN6fp/eoNPW+ xlzGfx+n7yCQgM5viu+FdpSfpqF7Drp3As5xh+xlTnNd8a5GYC8FBZLKLoLDhPY5+2Qx NGfdvVNOU2ud/pSC6PrEIlJHxGVmREoKm7FkOneYo5wzUq7yuBJjKssrV7AFxOrpzM+Y FGGLP2Nx4JKHifrs5SuEvT1fmQen2jENh7FkXmnZlQ6Qecqb1JOWHINr5h3+xCa1CIhU lYjwNwqYCKaevglrQp8DNfjtpZ6QA+F/FIyhuX1paatIrhso3SXpsn+sGfWkR+kFAdDs HDZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt3si12741776ejc.139.2022.02.02.15.51.47; Wed, 02 Feb 2022 15:52:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244269AbiBBGyL (ORCPT + 99 others); Wed, 2 Feb 2022 01:54:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244723AbiBBGwh (ORCPT ); Wed, 2 Feb 2022 01:52:37 -0500 Received: from mail-io1-xd46.google.com (mail-io1-xd46.google.com [IPv6:2607:f8b0:4864:20::d46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28152C061776 for ; Tue, 1 Feb 2022 22:43:19 -0800 (PST) Received: by mail-io1-xd46.google.com with SMTP id z28-20020a056602081c00b00611596ef96fso14555007iow.12 for ; Tue, 01 Feb 2022 22:43:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:date:in-reply-to:message-id:subject :from:to; bh=TNl+o4xe1hTSGSvtmbeiUvDNfb+TUX8jFchFwMWN6ps=; b=suMtiqVhrerIGYGXjgBinxZtAmROooSxmJTNgp8vUgPk/iyhAq3lWOrr/rAhiWUnSe 6QKh4PmIaa0NWETfFAUE0H/Ktv7dOqPGKh44JrlDmxwWdbgryNfoZjVi846r1lBuyqDC 8pdnfbvreJBs2PnV1/JZd1Z7KxtSqz137xuDGwnBLe7O2Us4w16SnDnaFFFrf2rXSEeO ulpssxz6RUK4sVX5DPdMrXMP0wJt3jshbSYgzElHfma4sev4HNlcV9LIlOL1/3xg/OO2 LWUtVDFabwaPyVjsrUFTowcDTEp3aBaBdLRFfXPogyAlEUm5ff6XSewgAm26cxHVGCr4 rjRw== X-Gm-Message-State: AOAM530V7ZaSCBMupoUdnnolS/r3ZB1iic2FZAwcm5We8wMOfC3Z8awU CI3wNCEbVLun47GjVMC0V08sjraOnUssRAECA7SZ4Jvb0dEN MIME-Version: 1.0 X-Received: by 2002:a92:cbcf:: with SMTP id s15mr16752186ilq.161.1643784197922; Tue, 01 Feb 2022 22:43:17 -0800 (PST) Date: Tue, 01 Feb 2022 22:43:17 -0800 In-Reply-To: <00000000000027db6705d6e6e88a@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <00000000000034665005d7035599@google.com> Subject: Re: [syzbot] possible deadlock in ___neigh_create From: syzbot To: daniel@iogearbox.net, davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, john.fastabend@gmail.com, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, roopa@nvidia.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org syzbot has found a reproducer for the following issue on: HEAD commit: e4d2763f9aaf Merge branch 'lan966x-ptp' git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=15b941f0700000 kernel config: https://syzkaller.appspot.com/x/.config?x=e029d3b2ccd4c91a dashboard link: https://syzkaller.appspot.com/bug?extid=5239d0e1778a500d477a compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16f9a76c700000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+5239d0e1778a500d477a@syzkaller.appspotmail.com ============================================ WARNING: possible recursive locking detected 5.17.0-rc1-syzkaller-00547-ge4d2763f9aaf #0 Not tainted -------------------------------------------- kworker/1:5/3747 is trying to acquire lock: ffffffff8d4ddef0 (&tbl->lock){+.-.}-{2:2}, at: ___neigh_create+0x9e1/0x2990 net/core/neighbour.c:652 but task is already holding lock: ffffffff8d4ddef0 (&tbl->lock){+.-.}-{2:2}, at: neigh_managed_work+0x35/0x250 net/core/neighbour.c:1572 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&tbl->lock); lock(&tbl->lock); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by kworker/1:5/3747: #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline] #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:631 [inline] #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:658 [inline] #0: ffff888010c65d38 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: process_one_work+0x890/0x1650 kernel/workqueue.c:2278 #1: ffffc90002d1fdb8 ((work_completion)(&(&tbl->managed_work)->work)){+.+.}-{0:0}, at: process_one_work+0x8c4/0x1650 kernel/workqueue.c:2282 #2: ffffffff8d4ddef0 (&tbl->lock){+.-.}-{2:2}, at: neigh_managed_work+0x35/0x250 net/core/neighbour.c:1572 #3: ffffffff8bb83ae0 (rcu_read_lock){....}-{1:2}, at: ip6_nd_hdr net/ipv6/ndisc.c:466 [inline] #3: ffffffff8bb83ae0 (rcu_read_lock){....}-{1:2}, at: ndisc_send_skb+0x84b/0x17f0 net/ipv6/ndisc.c:502 #4: ffffffff8bb83a80 (rcu_read_lock_bh){....}-{1:2}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:95 [inline] #4: ffffffff8bb83a80 (rcu_read_lock_bh){....}-{1:2}, at: ip6_finish_output2+0x2ad/0x14f0 net/ipv6/ip6_output.c:112 stack backtrace: CPU: 1 PID: 3747 Comm: kworker/1:5 Not tainted 5.17.0-rc1-syzkaller-00547-ge4d2763f9aaf #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_power_efficient neigh_managed_work Call Trace: __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:2956 [inline] check_deadlock kernel/locking/lockdep.c:2999 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5027 lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604 __raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline] _raw_write_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:334 ___neigh_create+0x9e1/0x2990 net/core/neighbour.c:652 ip6_finish_output2+0x1070/0x14f0 net/ipv6/ip6_output.c:123 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x61e/0xe90 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:451 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ndisc_send_skb+0xa99/0x17f0 net/ipv6/ndisc.c:508 ndisc_send_ns+0x3a9/0x840 net/ipv6/ndisc.c:650 ndisc_solicit+0x2cd/0x4f0 net/ipv6/ndisc.c:742 neigh_probe+0xc2/0x110 net/core/neighbour.c:1040 __neigh_event_send+0x37d/0x1570 net/core/neighbour.c:1201 neigh_event_send include/net/neighbour.h:470 [inline] neigh_managed_work+0x162/0x250 net/core/neighbour.c:1574 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2e9/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295