Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp509672lqp; Thu, 4 Apr 2024 23:38:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXndTpzVl8K3l7JISB9Dku51WjVnxsIHemibzF+p7WhIGfhVPWSAC4WKuvXONsWSPklmAfKMY5+wE5n76TpqG1coicjzLsv/MvK1bPGzA== X-Google-Smtp-Source: AGHT+IFCs72eeqianyyb0ErbpqmQnjAstCjQTD9TmAP6IcclxNvZhAqrpKQKz12V9WlIZEwuv6Vp X-Received: by 2002:ac8:5cd3:0:b0:431:75aa:d95a with SMTP id s19-20020ac85cd3000000b0043175aad95amr555590qta.32.1712299111028; Thu, 04 Apr 2024 23:38:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712299111; cv=pass; d=google.com; s=arc-20160816; b=Oj+XkMipyGJ6I1/QAu6tcIhK8MY0EUoH6WBtuwS7pLsgVnFswlm9oWcBV+S6OA5i1v h4KnFiLK4LQdJzzodS7DDMVzTs0DrDJIxFPfQWcTVeMAECsiNR+DiVDUgqI4POXKL1D7 BH++f1vQJv1bTjWqeTz0VOb3fgL0tVp0ZLvQpTisS0jgq5ZI91DOm28KmZd4KAaHxoEc yEE1BQ4TH2ue+n2Q1Ye45w74336vHO0YbHd7UcumacUKh2Ra2xGsv1woS0f60LP2FfZZ vmqCsEwd18SGXpGgoBOCZ6CLwkHbe8XvFJjHkG4Wqof8g7eFuKll6i7d6x5Ltv5hyU/T L4lQ== 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=32C3Z12kYRUdL4uqCRiJu/mCcyvTfRw+v0a2IfHjh+I=; fh=gfzgfmN3lakEcv/SyjhZQCBYn0Gbqvx6dIJKXebai8U=; b=hmlFsITN6yCAeFTqueIqWC1wvZsXeD9F1M3fniaF4b5amq2CBYORut/Cwqk0xBvCpG xjsSidpfdLSsQuQzSqq6F7hkC55GNvfmHnrr/TWysegc9lwHBMa5z8z8dhZ2z2BDvswF u5CVa6wP1rOxgQ2U0f4AZ6zMIwr8tmZcwEytVNKTc3IFmq4TG6zBUDiHYPWArkxkJVFJ B9fwG0shBYkwouoGZo16+lkkL9BbzMcV7qr7jb6tkFzFjHN0kPILF7WOsN5IxhBRFx+6 3tLs5Q1C0OmedU718BllsbgXbPQqJNo5tp6a5UpSVx111ey855mTPXSQ3yUpPQEfQtr8 eArw==; 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-132482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132482-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p10-20020a05622a048a00b00432c450da76si1145517qtx.57.2024.04.04.23.38.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 23:38:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-132482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132482-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BD7E01C21B94 for ; Fri, 5 Apr 2024 06:38:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E42C422331; Fri, 5 Apr 2024 06:38:20 +0000 (UTC) Received: from mail78-36.sinamail.sina.com.cn (mail78-36.sinamail.sina.com.cn [219.142.78.36]) (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 EC2DE14288 for ; Fri, 5 Apr 2024 06:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712299100; cv=none; b=fdfnd9ud73qvlyjrfZ/0Wx1iG2ute8oky33O32Lv7XOCq9eYJGfFGMMHBXpKZsMRiyI6iULMmEe64sOsMu6m+TmkiKyQfaa/yu9egWQOXdmpAxoZ++zTA5VbJ73JWrkWwmKmzIKs11tTCn81tdCnX5qSsuLkRzKOxtws/Sr12G4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712299100; c=relaxed/simple; bh=oNymYZovpHKQUVHHNR3z7XBkT03f7VT+VWP2ziykCAU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HGml/PBTeA3B5OGrQKzcc35jErq4T8durdqmDwgcP6KdsL3FVC7rMNi/nb4d2E8Crb2ZUMDAOTzaVhROqbnICmIC0gB1c/NgXjA8CKMlshmz2378ANKdldPlE+PRWtDiS9J+nQuTw38iT3+t/GsDtVqwGzhsm/25RdJhCrOD1Yc= 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=219.142.78.36 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)([116.24.9.172]) by sina.com (172.16.235.25) with ESMTP id 660F9C4800007FB4; Fri, 5 Apr 2024 14:38:03 +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: 80760834210454 X-SMAIL-UIID: 68458447AD4142DEA3B716A34E1E1B00-20240405-143803-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: Fri, 5 Apr 2024 14:37:51 +0800 Message-Id: <20240405063751.835-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,7 +353,7 @@ static inline void __netns_tracker_free( static inline struct net *get_net_track(struct net *net, netns_tracker *tracker, gfp_t gfp) { - get_net(net); + refcount_inc(&net->passive); netns_tracker_alloc(net, tracker, gfp); return net; } @@ -361,7 +361,7 @@ static inline struct net *get_net_track( static inline void put_net_track(struct net *net, netns_tracker *tracker) { __netns_tracker_free(net, tracker, true); - put_net(net); + net_drop_ns(net); } typedef struct { --