🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8802

Re: [PATCH net-next v2] netdevsim: reject port addition and clean up ports after a failed reload

#8802
From: Hangbin Liu
Date: Fri, 30 Oct 2026 07:26
26 lines
9455 bytes
On Fri, Oct 30, 2026 at 06:42:45AM +0000, Mina Almasry wrote:
> On Fri, Oct 30, 2026 at 2:05 AM Hangbin Liu <hangbin.liu@linux.dev> wrote:
> >
> > Looks Joas has a same issue fix with yours a few hour earlier.
> >
> > https://lore.kernel.org/netdev/179324296598.34505.11070163314749859668@gmail.com/
> >
> > > ---
> > > Tested with syzbot C reproducer.
> > > v2: drop Cc:stable and target net-next.
> ...
> > But yours have an extra guard in nsim_drv_port_add...
> >
> > Leave this to Jakub decide...
> 
> I prefer Ömer's version. Once reload_down has torn down the device and
> reload_up has failed, the device is in an uninitialized state, so
> rejecting new_port in nsim_drv_port_add() makes more sense than
> allowing ports/netdevs to be registered on a half-torn-down nsim_dev
> and only cleaning them up later.

+1

Thanks
Hangbin
Technical Details
Message-ID: <auRGjKzYwpK6WRqU@bogon>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353629-linux-kernel-netdev=dewy.ru
References: <20261030001444.289973-1-omermetekaya0@gmail.com> <auP7VyY3MGqOphL-@bogon> <20261030064245.4118081-1-almasrymina@google.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353629-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v2] netdevsim: reject port addition and clean up
 ports after a failed reload
Date: Fri, 30 Oct 2026 15:26:04 +0800
Organization: Usenet Network
Message-ID: <auRGjKzYwpK6WRqU@bogon>
References: <20261030001444.289973-1-omermetekaya0@gmail.com>
 <auP7VyY3MGqOphL-@bogon>
 <20261030064245.4118081-1-almasrymina@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2182222"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:kX6oqOnTFOfq5ekD6kp8edM8Ll4= sha256:hlOa3cYG3z7OXA7ukhoXDgR95A6BAruDmZLq37Cf6E8=
	sha1:lA/+qD/6QJ+BALGGbYILw4mynVQ= sha256:FAcJ/cq1zme0fXHHw8U4YiViKNIbFYrowtpP/UHiriU=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 0DCFF125C89; Fri, 30 Oct 2026 10:26:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id AyVAhTpjv1tk;
	Fri, 30 Oct 2026 10:26:42 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353629-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id DF101125C87; Fri, 30 Oct 2026 10:26:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 1079B2651A; Fri, 30 Oct 2026 07:26:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793345184;
	b=s4QJGP2lza/WgtVxb00Zt6xjRMnYX/OZsTkV6fhd9MknM3gwwQl094MHazsxtyDfiIrL
	 rmf7zxAq+VMZDFySpHakBUtm0WT5qwAxPan8/3b7QmSofd38ooVckRTpwSwCokImaeHxn
	 SoV2OtXoCGDKTtnLD04QaSOA+A3JGNNHXaMkFyOIyJwN4NyWcbJMmSDr4wBxDNVVaZA/E
	 E+6GXoVghQPpaIAjiCLSoPdSpepYF8QrBEwmL5wjBn16+M9ZN4HzD84Bw4Z/gTWllpBLw
	 Q0WCQp7BPO01DBc8D/T6Iy2SbS1UO9wYA0Azw/wC1hWhzk0wn8OF8Ctst51nWQk74fw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793345184;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:
	 Content-Transfer-Encoding:In-Reply-To;
	bh=NyT4TGT6hgIR8kPb90iUAjfgRkiqKdm9uwcXklqZWrs=;
	b=X47I1BrwUNagFj0r0e1gzjm+ZXWQBughye7yZ7o8vkksx8N1gmOJ2MGrMyGRIsj6Xu08
	 SfSrSe6M1oeXjPHbFJKif6cFVYDYUiqVsevs14Jm/2l65O0yeZq50/ta3ao0dVoLP+791
	 OG8lqYWRaG2+p6np7lWT/QYx+ipYEynGqxEezYQYX7B8q/4HYtT4pi/7ViS3mvS2JtBFp
	 Cu4sxOdKrlFUqvO+B4bb5KM2JUOnjv0UW2mGiNnXl8nPgI5Larq2QWKQW1EUtfWYlpdO4
	 tXvJ05r/kMRzF5ZmYJU3flhBxCQhDTPUZAu7pBWQRSaiXPHW8F7TTAvBoljfaw+6FbA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Wne11m5w;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 86324606A323;
	Fri, 30 Oct 2026 07:26:24 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Wne11m5w
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.51
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793345183;
	b=yGwfj3BSbW870lsQNlwRS3uaqL4iUwVzDIx91djkWgDRwMA1U+by9ONPrQV7iIMRgznk
	 LJNVcaKeRH+pZ0oDhge0u4TFCPbw+3trw8XvBwWg01nUclHsDxXdhCHPoNKCV/4v8oW8U
	 5U9Fm9a2oGxcclIAMsUF0z4teVH9ploiYtlhzJOsi6t3/9dv9Lfuo4J32IGpjLlYiwuvJ
	 VONxRreF7M37BmYke+FdnnOPonqSm7KPyKj4EF09qRLt9rzVu5qOPoGqaLnAgY9AY8Km8
	 ErgT3gEj66t/pmMxppLWIu6+/fxCapWhnLzV4ZEfsQpJvRncTyk99nSEL9qt059rsPQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793345183;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:
	 Content-Transfer-Encoding:In-Reply-To;
	bh=NyT4TGT6hgIR8kPb90iUAjfgRkiqKdm9uwcXklqZWrs=;
	b=Z0YAFdbr99Emf7vrNAa8HiBUxGdrZDSN+Ei2UW/v4f+LGIAxhCvG3mzxWQvOP4v/fYtS
	 +SM7Kn9nZzPDohz8QRKhuwRCdumoNJNyHEuX3hg6TyBlmShFOKFQlP1DKFmofk0zmp+82
	 IYW1ELza7CTU3NZxD06FHmY1cEe0jgPuY9M7WwT8W8k0c/GIsRpxxar/PLS8960Kj7YvA
	 0DabE8na7QtfuuNjD3KgrVrAE5lnJaUC2Qb2XRqyKeksHXUEWHmzoimSU8bTQT6Y0zPug
	 Gh8HyqfL4socIw7gt0yELJfyJXH/9q1PPA4kwNj51n2UO6rLjjMUjLgc8YYGovNmOwA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=Wne11m5w;
	arc=none smtp.remote-ip=91.218.175.51
X-Received: from mta0.migadu.com (out-51.mta0.migadu.com [91.218.175.51])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72CFD606A31D
	for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 07:26:20 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 72CFD606A31D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=o1OkAFsPF7Db+QblpcO5qVWk9d0XdGrhsF15SUMl9TM=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1793345179; v=1; x=1793949979;
 b=Wne11m5w8ibnL/tbl4S/kdc+uich8+U+kfITNaoD4FsK/4eMwQJaCUMHwwqHPOijy7nf+vbV
 YpSGTLuKHu+tAubORY8F/X981+YI8h5iG/SC8cB8QKQ2o4Fq082z8P2Ns3R6/LOMyuEtx2/MnAa
 IHocC8lvDB9StmEMKkLTWFlo=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta12.migadu.com with ESMTPS id e84fa612ede8427d;
	Fri, 30 Oct 2026 07:26:18 +0000
X-Mizu-Trace-ID: e84fa612ede8427d
X-Migadu-Flow: FLOW_OUT
X-Cc: Ömer Mete Kaya <omermetekaya0@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Joas Antonio dos Santos <joasantonio108@gmail.com>,
	Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>,
	Jiri Pirko <jiri@resnulli.us>,
	syzbot+88435e204734072bf39a@syzkaller.appspotmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261030064245.4118081-1-almasrymina@google.com>