From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 704AB390C95 for ; Mon, 27 Apr 2026 08:07:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777277265; cv=none; b=gCD1vQlislb2tZ4Rmw4i8/tUTUh4f2kmjmGPf1lRgGkV0b+pf9NWVVg0e2PdeMD54L/M6FL8SvFQBnoe/xjxZoVbVMAh1aI5np3bKcPOMdPgwfb59uuCmpnGn5U/FtTq8z9E4nkv+uANesk1g+RCtS3d8zwiCfmbblCMnXKdqKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777277265; c=relaxed/simple; bh=NmleoNkeAR3Ndp8dp1vkK8TK0y1144rekpDYcW1gZUs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OFrhhojWs3xpcFFYR+tvF6UjG8MAfulDK0XSdBLDz/Y/9rN0Au6Ou04Lx91qGVLhmRQiB5eulhyRt/88sLZzwN0LCWz31lEvu35k4ZiDNseegQDOT361Ox2w00QjowPRKqYWJRZlfkNLFNK9bx7TxTZ6nVO/tm0UpqocXa4k9Hc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=sS2k5mmQ; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="sS2k5mmQ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 6D2411A343C; Mon, 27 Apr 2026 08:07:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 40F85600D1; Mon, 27 Apr 2026 08:07:37 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B2C8D1072227A; Mon, 27 Apr 2026 10:07:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777277256; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=V5TkgjwxbUuArCO4ICwo8xJ3fv0RVK8UqGSazM8m0Bg=; b=sS2k5mmQAU4Zb7zznUnG859IoZPkdpzVfbBEqSt2jdp3iibOyd685Y3UoWN8fV1P2FA6DF RwuoebpIjbLNXLCXAdZYOBwssrqtL3Wo1rvYugVJdkLpqsLU/D5ua1v7PK4RUfTJD1k0JD QLzZucGMsbZzapITl7u1LR0NwXlj6BhPXKUb+nknCxQD7381AKuojgb0Fh7ck7UPmKyAoT lypZEI24eyFSSzHnH+5SiBlyRK0uFd6pscE/hNu4iwqRRwdb5vOhMneFZTuYzqfcXZaDE3 tPscWq0H0c3SLSHSn3Fyc8/B5EdtMjlVcEp7zy2BZPKvyzeRcuGs+kco/GMxkA== Message-ID: Date: Mon, 27 Apr 2026 10:07:29 +0200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net: stmmac: fix RX DMA leak on TX alloc failure To: dev.taqnialabs@gmail.com, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260425-stmmac-rx-desc-cleanup-v1-1-1a18a704c422@gmail.com> From: Maxime Chevallier Content-Language: en-US In-Reply-To: <20260425-stmmac-rx-desc-cleanup-v1-1-1a18a704c422@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 On 25/04/2026 14:38, Abid Ali via B4 Relay wrote: > From: Abid Ali > > Free RX DMA resources when alloc_dma_tx_desc_resources() fails in > alloc_dma_desc_resources(). > > Signed-off-by: Abid Ali > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index 13d3cac05..8bb843b55 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -2370,8 +2370,12 @@ static int alloc_dma_desc_resources(struct stmmac_priv *priv, > return ret; > > ret = alloc_dma_tx_desc_resources(priv, dma_conf); > + if (ret) { > + free_dma_rx_desc_resources(priv, dma_conf); > + return ret; > + } > > - return ret; > + return 0; > } This change looks correct, however you're missing a Fixes: tag indicating when was this issue introduced. You must also indicate what tree you're targetting (in this case, net) : Please look here for the process information : https://docs.kernel.org/process/maintainer-netdev.html Maxime > > /** > > --- > base-commit: 028ef9c96e96197026887c0f092424679298aae8 > change-id: 20260425-stmmac-rx-desc-cleanup-440f05845492 > > Best regards,