Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp605681lqe; Sat, 6 Apr 2024 15:50:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRE0iwXuteWl9HyWIoqioPdg1PK4va4Ifvg7l2OEtpd0c9n+fgqMZqWet4tMYFQNiWsFVlLW5mc6YmErPtBNTk4MRvZdM8iksA68TtNA== X-Google-Smtp-Source: AGHT+IHK2hS9gcsR2yHIXITNF6mlN2N1herkfvBaaqDLVjrYUDk4icDcqNvF9r9/Z+FV3jNRN8YU X-Received: by 2002:ac2:4d92:0:b0:516:b148:6d6 with SMTP id g18-20020ac24d92000000b00516b14806d6mr3263272lfe.50.1712443804626; Sat, 06 Apr 2024 15:50:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712443804; cv=pass; d=google.com; s=arc-20160816; b=TVJrtWJ7zQ+UNh0tb0elqxj8uvM6MrrfuNxLPl0Me6zePpT/l6ZYPxyV17d7GqZ1qR p+4i6Uot8icjZ2g0Hr6oz7QYBM6fSsPNihiMNpj6fBr4AEitNM09TddrZT/Jk+fxkt4r AjGLkF18N5jyRwIe4zvIQg5CwcGqLw8m7FFQolbv+tYK5codwU+bYGenjrV3+DDXJIiQ o0pdDbD9+B1f0DVVB0vNJjPSm+XOeNI9u9xABk20BXt3JA1LZK9V4JiTuAz/314FrX4x dTn1XnGyXm5w+Co4wT7/KxKq99Sgf4roWEi+MmPsv9ljA8xm8+puI+RWLC0KhBH5Cpat uKUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=jBYuehiHqdEjEruEN5Z7323U9ZhNhpY3rU2nGMG2z20=; fh=gfzgfmN3lakEcv/SyjhZQCBYn0Gbqvx6dIJKXebai8U=; b=W6mbqCCnZNMY5EuqgzpiFJ/lAeX7oCMh0CaD0n+vhegWzGduiF0dBD8WLDzOT3m8SG QG+wbMMRWsAHmpZngDyhxuyyr/2eWl289kYjJxlpPu1Q30bUiSga7jZPvSoJxdG9p62q cQaa87Qrh1hpWzT290UbJ2O6KselSHLNAsFMRAWQCO0TTVprFeid3zltvQgjCVebdzI2 PnOGgKlhLLaznAJLvES3q9KFcVzG/4NhYB37L8oRRIBuSSvQez8koPjQhbF8+12/YsnC K5b5wOI6PGLfbeWRxFLvXEWGSSJnG3LIKgW3hjMzCnb8cfFM+YP9pg6UG9FG2/CEvzKt +olA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-134098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134098-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j18-20020a170906051200b00a474ef64a41si2117227eja.20.2024.04.06.15.50.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 15:50:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-134098-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134098-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4B9211F21723 for ; Sat, 6 Apr 2024 22:50:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF2A057882; Sat, 6 Apr 2024 22:49:58 +0000 (UTC) Received: from mail115-76.sinamail.sina.com.cn (mail115-76.sinamail.sina.com.cn [218.30.115.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1831157339 for ; Sat, 6 Apr 2024 22:49:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712443798; cv=none; b=nKvSiI67yVWuXT5tJfihBTBXaeQ0UhSq33ZoTPujPugtyS2n+v1fLmF4nvEu0p4UJXCfvuZO3vdDSiuYV4LPC2i4Lxx/4AuoneiUH21jrxJpCnOxlR5ya+FixQVhHZIpn+4kJHgGgW64PuVsXccWkLH540ZHL5GiVI9Kwob+dLw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712443798; c=relaxed/simple; bh=lv6hN5+6pEeaKYcsI5q9TuzzxUlJb9ppk6hDBYFEvrw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dQ4KOdl33B1mozKCDpJPtd6sG/9syo1SPIEVhFIvdGwVTe1T+w/AlNdQ3PuusO2iXMBn04RZFnUpGRVqvrttc9uCzsi3DfJNQcvj/GrsZeojn+nOjyLsvLY11PVYXdnmTT/5AVKR2opgMFYxLZhuL/+exDV/yLboAet1YL4y5PA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.50.84]) by sina.com (10.75.12.45) with ESMTP id 6611D16100001AC1; Sat, 7 Apr 2024 06:49:07 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 84251431457705 X-SMAIL-UIID: D0A6F5E6411648DEA00001E700966CD6-20240407-064907-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [net?] WARNING in cleanup_net (3) Date: Sun, 7 Apr 2024 06:48:57 +0800 Message-Id: <20240406224857.1297-1-hdanton@sina.com> In-Reply-To: <0000000000009c0f98061550a827@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 04 Apr 2024 20:00:30 -0700 > syzbot has found a reproducer for the following issue on: > > HEAD commit: fe46a7dd189e Merge tag 'sound-6.9-rc1' of git://git.kernel.. > git tree: upstream > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16696223180000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e --- x/include/net/net_namespace.h +++ y/include/net/net_namespace.h @@ -318,7 +318,7 @@ static inline int check_net(const struct return 1; } -#define net_drop_ns NULL +static void net_drop_ns(void *p) {} #endif @@ -353,6 +353,7 @@ static inline void __netns_tracker_free( static inline struct net *get_net_track(struct net *net, netns_tracker *tracker, gfp_t gfp) { + refcount_inc(&net->passive); get_net(net); netns_tracker_alloc(net, tracker, gfp); return net; @@ -362,6 +363,7 @@ static inline void put_net_track(struct { __netns_tracker_free(net, tracker, true); put_net(net); + net_drop_ns(net); } typedef struct { --