🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #14795

Re: [PATCH net-next v6 RESEND 3/4] net: stmmac: release descriptor resources through priv->dma_conf on open failure

#14795
From: Jakub Kicinski
Date: Thu, 12 Nov 2026 00:36
17 lines
8996 bytes
On Fri,  6 Nov 2026 17:05:05 +0800 Ding Hui wrote:
> __stmmac_open() copies the temporary dma_conf passed by its callers
> into the long-lived priv->dma_conf before setting up the hardware.
> When the open fails after this copy, the descriptor resources now
> belong to priv->dma_conf, but the error path returns without
> releasing them and leaves stale pointers behind. The callers then
> free the already-copied resources through the temporary dma_conf,
> which aliases priv->dma_conf after the memcpy.

This patch is not sufficient, as AI points out.
The duplicated error path on failure of __stmmac_open() indicates 
the state transitions need a lot of work.

We need someone who knows what they're doing to look at it.
You can't even read what the series info bot is asking you.
Please *DO NOT* send any more patches for stmmac.
Technical Details
Message-ID: <20261111163635.042fc7ec@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361403-linux-kernel-netdev=dewy.ru
References: <20261106090507.1020751-1-dinghui1111@163.com> <20261106090507.1020751-4-dinghui1111@163.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361403-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v6 RESEND 3/4] net: stmmac: release descriptor
 resources through priv->dma_conf on open failure
Date: Wed, 11 Nov 2026 16:36:35 -0800
Organization: Usenet Network
Message-ID: <20261111163635.042fc7ec@kernel.org>
References: <20261106090507.1020751-1-dinghui1111@163.com>
	<20261106090507.1020751-4-dinghui1111@163.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="974558"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:SbYe16edTdAi7Rf3xknUCJi1Pns= sha256:2IsBK5CMFqD7UH2qQ7UBLVGQ9jSiTbNwUedqdXeN0jQ=
	sha1:peONiNvtvpZi4zeLHCNmkDPf9Lg= sha256:IZ1BnMcnRLeQRYJu3TTJZRH43Oy9plJKWGRrAHemr1g=
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 470D6114098; Thu, 12 Nov 2026 03:40:58 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
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 gsp7eAAb_CK4;
	Thu, 12 Nov 2026 03:40:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-361403-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id C95DC114042; Thu, 12 Nov 2026 03:40:43 +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 5CDCE63A5B; Thu, 12 Nov 2026 00:36:50 +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=1794443798;
	b=JS6msY4vPMV1cFifXPJsRKryB45K5wk4b54CPyOGqBQ3MCzFvd5Nm+UU+cD07RgZZ8KH
	 vyl/rBlvUCJ+CTqyIs3JwZDPSaitmdZw8LhlBOjSHQi031TF7Qh7hgwHrVRzpt4qevyK+
	 KHk6HWsV7DlLD1Xq4VyzrUijYn7kkCPBtCvPbCDDn//2ieX0uBxBIcnCGV/NUUaKXR8Ge
	 su1MX7TrYY6ePQ49TpzTgP2RZhYvkn4NbQfZBCoompD6Dcf4BaD6BJQvfc1eFoPv7OCCj
	 5G8H3oP63puHK+ZH/01UU6Zwdcv2VMFicgS7tpdEy0rKcrKeMDVy3knez8aKXDoqI1g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794443798;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=iV+es/fp+vyxHucc03Dfn1TU20M5SwM8Ekj9KO5fn7I=;
	b=elBS7h2SnSmfySN41ki/VrbYwrylOplUNJIJ4EcUOIwtUHb45R6cGhpNHMP8j0EYjUKQ
	 mzvl7Mzy6i2foJyj4w7HIO273uDaexc1Q9L3GRteIl4aeMOZixZTJVCSkawX5dUEHrVwr
	 YLfEWYAu6PfrUSckI8qnGNjFX61KB00J3e0ZW+8ZqVWvACbiDNp4BgjAp9BZxRq1ZnvXQ
	 VzpqctO8C60t6X57AIEgPWEVdvgj6QzNidmmp0XUm7L2TQbm435twqCUGQ/QXkcQQWOfD
	 1hdug7J1h/jm5eugiOS3fC/h09IC9ADhVtPwiXhOq47Zj1P5Epw72xYaJwpBPdvwSFg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=flsXT5+t;
	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 1D44D606A880;
	Thu, 12 Nov 2026 00:36:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=flsXT5+t
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794443797;
	b=jaikbc6BbUTOs9IAlxw0PDewXFbFAvc2FovE90O/HqyK1bU8sDtvJzzlvgWDHevURQk4
	 I7glnxJ5qtYipt67eP3ZwcyTKMD6s8QqjKtpctXJ3S7mK59eR3McYrAMdS9kLKEUNiuLI
	 5ppCdFkWEEYOyjXX8tvHGMLjg1AYCZWH5G3ct4iVLXJd1tzacugu2GKqOt7RiQy2y4/x1
	 Q2rKWgT6BVTdXCUVOo3sPR57LZp2oQZdhsNmJv2Bk8hCXbo0hYMNup42/hiXDQi/pJVtl
	 LT9LZSbgBzja9AEf7VRK8oESal300KVlWWxm9OzaJmdxoG9nFW7frslAHizF3CxkpuA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794443797;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 In-Reply-To:References:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=iV+es/fp+vyxHucc03Dfn1TU20M5SwM8Ekj9KO5fn7I=;
	b=Na3hKNy2STk+UHY8kttKxofy9ZSAFMxEVdhUrP1m1osOXXpPdZrXyHa2hivJPaxLA1KD
	 l6DCUj4pPzLvh0qhnX9QcTmszuExps/NqbeGQNYCAP1qmcWSUN66WMBnfQhtWW19H5WWq
	 JjucvpqC/qkoSRVuNUPSF8sL5+f/yE/+wLwahxvXs7YBWw9VaMt1KJw9XYPh8VsEXdLXr
	 3JLMYZbC2cxWrWjV8JDvFat0Zzm4feTQ5CoBh/gH3iUNJglToNS4HHgZSvrMmRMok5jil
	 YitnoG+KhzkrCwjnetvPlAk8AYlbf4wSvMqIuQ2G2gFIFamOb1UOAv/jqiDgZWuVV1w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=flsXT5+t;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BAB1606A324;
	Thu, 12 Nov 2026 00:36:37 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FDEE1F00A05;
	Thu, 12 Nov 2026 00:36:36 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794443797;
	bh=iV+es/fp+vyxHucc03Dfn1TU20M5SwM8Ekj9KO5fn7I=;
	h=Date:From:To:Cc:Subject:In-Reply-To:References;
	b=flsXT5+tcmj//681j+iBaPwWWx0hanIAZykaBz+rgOLLDtZ1xxZXmSt3dB5qM/SPs
	 wdpCgLiAom8akYYjG0liOHd7gU+7fRdZ+oihZdhx1pGYQcFoN3/bcFcRvYxsP/hpun
	 0iswwTIY1P9x5NS5ItKQ1ht9jC6WbAavlvJ1OKew5LxrAl9rlLLPfZ2HZ81qWj+o87
	 6+tm2ylVXkowdAOPZM0p+5gDOJyq1wKGUtlrh/J3YIKWZ7YKsqyQ/HDL/h3nYGJYqn
	 aEr3hCtDmMDNKsvq52WuSx+pJq7kOtOGRgyeDc/NdmwjHRT2uYNo/x06q7FKJrAdX9
	 ytbLjEzdrzP6Q==
X-Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>, Andrew Lunn
 <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric
 Dumazet <edumazet@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Maxime
 Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue
 <alexandre.torgue@foss.st.com>, netdev@vger.kernel.org (open list:STMMAC
 ETHERNET DRIVER), linux-stm32@st-md-mailman.stormreply.com (moderated
 list:ARM/STM32 ARCHITECTURE), linux-arm-kernel@lists.infradead.org
 (moderated list:ARM/STM32 ARCHITECTURE), linux-kernel@vger.kernel.org (open
 list), dinghui@lixiang.com, xiasanbo@lixiang.com, yangchen11@lixiang.com,
 liuxuanjun@lixiang.com
X-In-Reply-To: <20261106090507.1020751-4-dinghui1111@163.com>
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