🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5803

Re: [PATCH net] net: emac: guard PHY bitmap teardown

#5803
From: Andrew Lunn
Date: Wed, 21 Oct 2026 00:50
18 lines
8878 bytes
On Tue, Oct 20, 2026 at 03:27:23PM -0700, Rosen Penev wrote:
> PHY-less and fixed-link configurations retain a negative PHY address.
> Avoid shifting by that value while removing the device, and serialize the
> bitmap update with PHY discovery.
> 
> Fixes: d6f144830bdf ("ibm/emac: fix improper cleanup when device is removed to allow re-bind")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

This is actually two different fixes.

Please split this into two patches, one adding the mutex lock/unlock,
and the second looking for -1.

Since this is a LLM found issues, not one which actually bothers
anybody, please submit to net-next, without the Fixes tag.

	Andrew
Technical Details
Message-ID: <678ea0b4-ba3a-499d-aa5e-217330590663@lunn.ch>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349670-linux-kernel-netdev=dewy.ru
References: <20261020222723.1746201-1-rosenp@gmail.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-349670-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: emac: guard PHY bitmap teardown
Date: Wed, 21 Oct 2026 02:50:27 +0200
Organization: Usenet Network
Message-ID: <678ea0b4-ba3a-499d-aa5e-217330590663@lunn.ch>
References: <20261020222723.1746201-1-rosenp@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="4005972"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:cT4Z1wmLyy3Z2x3qLf3Sc5VRYmk= sha256:rwzVP/4NKogb8ffSboTJuV188h1jXaRqQ5GpFuPyHvs=
	sha1:nW16yoJP/kMor0ip3Ho2ewN6Fdg= sha256:wg+YdEcUnCGQzHzGekRw1O2/F0dnEC/OkdkfsVmm29c=
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 ECB18110EBE; Wed, 21 Oct 2026 03:54:53 +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=lunn.ch
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 VD9gKQtd3CRM;
	Wed, 21 Oct 2026 03:54:51 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-349670-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 8CCA1110EB7; Wed, 21 Oct 2026 03:54:42 +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 E8AA23ABEB; Wed, 21 Oct 2026 00:50:42 +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=1792543842;
	b=Gpt8mOcxti2bVUvusBZ8vxwAzIQL7EZPHj+SZTO+mS59bderCk9QS9edV1sQSRhM0170
	 C919dfEifBpaq+U37b4EI5cdFlilUXpyyORGMh/kmKgUXgpgCXYHO8wql/ZRaMps0zFQI
	 FdzJF6hLrFecAyTrzqdXuFCOYCc69MSlJuaQ9qYMeqTTSZNPlw+lSanY3aoFFgft8BCG8
	 R6L7RoseiAVFAHeupK/4FkdHnOPU4/CMYC3UyeDd86ZNjhvug/MTlte+92J8F2VhzRqhw
	 nfj4R1WnXhDqSzEhjWWo7G0cyzH4Z41PkIzvhmNyOkcIlC97h0ivDE6zDGTrYM4B0ow==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792543842;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received: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:In-Reply-To;
	bh=7NakYNL871cRTQpV2KiS4MwXIGfg/GoB9+Fx09KFnvo=;
	b=kIexENfXf6JCR3lImRb+C+KeMsrWhSsZCgpoTfPnvHEdjWu1qUiqwTDibTjtq9faW4nq
	 7zxgZka92ZGw3RS7hnLUcYA/N9OV08VsKPTh+1S0+Xz/zD9jhHYDD8VLookEgrlM0Zneu
	 6hbvS5cOPPQjiBG4oFGTTmVCpyg1409aOuHpUsZ27OgosuDRybdXrA6UOUcp3PLR+Z3LV
	 TDLOEK5E48M8y/5yyOHIbgc1COu2ucgNoNbVwbiriW47QSmxNMv1RDz101FciWGHr9D/H
	 Al9HI7i9DWUgk96dvvDzaeTlMtQcxtLHZrcVDigBJ6cElyYgCGVM1CLHjIOiY0DBWzw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=br3oF4LS;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	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 BE59C606A322;
	Wed, 21 Oct 2026 00:50:42 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=br3oF4LS
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792543841;
	b=UwPFVkhNyYbotPQ+UXGb/PcTYLvdDWVa9fBrxs0UFpxIb0+zxUCsOsijmKC3hcHF3ggO
	 +20Ha3CYNkK8/CuUWZmLKMJrAY/LmsZYNUvLrUrit3LtKDMXON5RtOc+38SREtyyvIlA4
	 ay5VdOcm8rD9lIwKo2wi0HrxA3maWiojwjQhCRkLcQydVND2No8Xte0w22VqDrQDUkmIs
	 5rz4k39bBengROm7BiooFaky3PnMXsR9D/GTVS8S/Br1KAOLJJlCDCh+aJkESrGAQ33B6
	 EL5YaDJnnmtpaBSzGn2TWg2r8hDprhIiwsqORCuzOpQNTGWZIj1Q4P8SoGtwZsm0QBg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792543841;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=7NakYNL871cRTQpV2KiS4MwXIGfg/GoB9+Fx09KFnvo=;
	b=gaNTaYJVIJvFF6JBJikL+D3119CU8ka94mdMahDpO+52Y8Gqg9GYVDAd1W/ZuIAJoPUn
	 EvKysz0gM8KXEJ8f/vQbLQ+VnMPe5T+MUOSsEizn2WCxFTNA9CunLQPrVsxpFChWDfQw5
	 s7bL+U7FHpvTzC8V1pROHwRurK8Qoo8u6ED6lE7mfeUPAGnmFprlC1rdVbafhEQ9WoOEh
	 9JdGrAWsjehEv6SidhRv2Cqtu7jwEQVXWAh6u8O/bmwyCAZSaNzQESUemCiX//P0pXOe+
	 SYfotWIoEdGcMm/D1NaSU1si3nLtLic3KOOoZAmU8f7wNPxh2NmYRjk+iMltLtpGk1w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=br3oF4LS;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DC16606A31D;
	Wed, 21 Oct 2026 00:50:41 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6DC16606A31D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=7NakYNL871cRTQpV2KiS4MwXIGfg/GoB9+Fx09KFnvo=; b=br3oF4LSH+w9t5Z4Es9N1Z3o5q
	XOkoZmbw7CLG8L275XdUmjMA3XNYI5hU69TCCVp4NaArIBQTTxznbTiuYOzYWXVTmDYsmfnrVwWTu
	osaUxGet2maR7WClZXcGLKkHS3qPo11M0nRt6qr/PyLYtWPqcF4SNkRz9w6sASaVqwrk=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xJKXD-00BwsC-9z; Wed, 21 Oct 2026 02:50:27 +0200
X-Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	open list <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: <20261020222723.1746201-1-rosenp@gmail.com>