Article View: linux.kernel.netdev
Article #8617Re: [PATCH net 07/11] net: au1000: fix buffer descriptor free list insertion
From: netdev-bot+sashiko
Date: Thu, 29 Oct 2026 16:15
Date: Thu, 29 Oct 2026 16:15
85 lines
11161 bytes
11161 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message and Fixes: tag present this as a functional
bug fix, but the bug never affects runtime behaviour.
--
net: au1000: fix buffer descriptor free list insertion
The patch changes au1000_ReleaseDB() so the returned descriptor is pushed
onto the head of aup->pDBfree with its pnext pointing at the old head.
This matches au1000_GetFreeDB() and the list setup loop in au1000_probe().
It is tagged as fixing the initial git import.
> ReleaseDB links the old head to the returned descriptor and makes the
> returned descriptor the new head without updating its stale next
> pointer. This loses free descriptors and can create cycles. Link the
> returned descriptor to the old head instead, matching GetFreeDB and the
> list initialization.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
> index c0e38a507f892..f8976e324f0e7 100644
> --- a/drivers/net/ethernet/amd/au1000_eth.c
> +++ b/drivers/net/ethernet/amd/au1000_eth.c
> @@ -583,9 +583,7 @@ static struct db_dest *au1000_GetFreeDB(struct au1000_private *aup)
>
> static void au1000_ReleaseDB(struct au1000_private *aup, struct db_dest *pDB)
> {
> - struct db_dest *pDBfree = aup->pDBfree;
> - if (pDBfree)
> - pDBfree->pnext = pDB;
> + pDB->pnext = aup->pDBfree;
> aup->pDBfree = pDB;
> }
[Severity: Low]
The new linking looks correct. Can the old behaviour actually be seen at
runtime, though?
au1000_GetFreeDB() is only called during the first ring fill in
au1000_probe(), before any au1000_ReleaseDB() call can happen.
au1000_ReleaseDB() is only called from two teardown paths. In both, the
next steps free the descriptor buffers and the au1000_private that holds
pDBfree and db[]. The first is the au1000_probe() error path:
au1000_probe() {
...
for (i = 0; i < NUM_RX_DMA; i++) {
if (aup->rx_db_inuse[i])
au1000_ReleaseDB(aup, aup->rx_db_inuse[i]);
}
for (i = 0; i < NUM_TX_DMA; i++) {
if (aup->tx_db_inuse[i])
au1000_ReleaseDB(aup, aup->tx_db_inuse[i]);
}
...
dma_free_coherent(&pdev->dev, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS),
aup->vaddr, aup->dma_addr);
err_vaddr:
free_netdev(dev);
...
}
The second is au1000_remove(), which runs the same release loops and then
calls dma_free_coherent() and free_netdev(dev).
So nothing ever walks or pops the list that the old code corrupted. The
lost descriptors and cycles in the commit message would not cause a leak,
a hang or a wrong DMA buffer.
Could the commit message say that there is no runtime impact, and could
the Fixes: tag be dropped so this does not go to stable and the net tree as
a functional fix? Another option is to remove the au1000_ReleaseDB() calls
from the teardown paths, since they have no effect.
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261027223140.3774570-1-f.fainelli%40gmail.com
Technical Details
Message-ID:
<179329051744.3134.5754193683869445346@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353371-linux-kernel-netdev=dewy.ruReferences:
<20261027223140.3774570-8-f.fainelli@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-353371-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 07/11] net: au1000: fix buffer descriptor free list insertion Date: Thu, 29 Oct 2026 16:15:17 +0000 Organization: Usenet Network Message-ID: <179329051744.3134.5754193683869445346@kernel.org> References: <20261027223140.3774570-8-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2044028"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:MaRCilZlVRSF+0c224+hShKE8lQ= sha256:EFeKqrWBDl+VnWwYNeE6PnsacDz5r2cz/qjMhurANf8= sha1:johZJSsWQYOj3N4YdWCFT91ZrrI= sha256:kcdNagKy6K44J8lpIqBUSxnB28ka3sXoY+UbeWMfopI= 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 77F29125C65; Thu, 29 Oct 2026 19:17:07 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[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 B2hToSc3cQGb; Thu, 29 Oct 2026 19:17:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-353371-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 76744125C6B; Thu, 29 Oct 2026 19:16:56 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id C8FEF6028EA; Thu, 29 Oct 2026 16:15:48 +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=1793290525; b=SelNFUE/JseRXAgDCEbLe9enKp859kB4X0ESt4v4t7UVVzJYyP3zqY+8GzYLEolkW7nH 2PE61hc6WpiukJ8clH7a+m/ZB1ue6D2vlUalobpJ2o1PnNitFlU2C3zjCllWMvrwz4hxm YC1it3nhxkD8fTiEShBkO1qBI+3ZhzAI2GmsH3BCzL7cgYqtYACrfMw8EwrZHPFc5D3UC jUbe5VQivKZAzB3vIjdFcMZFrrnRIyVSH0OnOWPfLKTjesTO4ifQF8DKV9jVgeLS0kS0q jps24JZvWdQ9etSJfZpKjEazQEFk8TIg6ZYXlbxDMnEMGjacLkvZ8Nky1nXQFPWHfKw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793290525; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=CV+I0WfjDJ8Xoj3e8ojq5cBu+5LIzM4ObkQfPuSQTBg=; b=Fxz5yqkqyoocZLepcI1mdW2CehSEPFsp4VApZS1Pp2DPQczmdb9jw3NO5F0nSSD+U5YS Giviql/PLp4Ja2kqATHOwKNEHhWUPrq7BAkSSxVUOBZopsJ4Xz07mEVJFfcLlJIkWkZY4 WDCCajUg5BSZvuSSEBE662BC+Ye/8gTNMMv/PQz6YKlkf/TpUjwN7RMSZufWouV4j07g5 ZLoPMJy/EVhVJU5KivRdPchHJMKCu1yy8CHYK5QFwA6A6Sp6okhymeGCJB8Nt76bGnGL0 nyq4mB4ta2/JtLNJz5eHDNBp8i0cV1BO32CVJMUPuOTvfTzI5GC4RMY5c+bLzWeDlNw== 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="J6/3Ybfd"; 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 7EC37606A337; Thu, 29 Oct 2026 16:15:25 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=J6/3Ybfd 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=1793290524; b=iIjgk2BQi+GlbhehUr3PwLt1WusF0qT2pjVBzjxXb8pVaNbRn/cE0WuLlNCov56YGOTO y3gppDlr+iHXfNwgLqUetgOzw9RZi5Yxsqwo51EqP3G5JhC8WCy0wwbqX2UB8JTgRDGb2 KqYoPeMqc00jAzCzR/M9Dk8uHvpYgGRJNMZZELjlR35eMHJmKGWhfuNPWuKXZ4zwNrmTo jrRD97ylyPDm3sCLowJdJ2uqOECDY4G9VDLYv44HIrikmkDCdMqxi5+FHpG6mFUCdudfu cjjc0qYC416b7CgcTykGA5CuSR/dvFQXkH6r7hX0RglPBSzsoNQdQk93pveOanp5N1g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793290524; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=CV+I0WfjDJ8Xoj3e8ojq5cBu+5LIzM4ObkQfPuSQTBg=; b=0g/v+tWqno3D21pybyYUdnB3gN9rJHJGwpBoOBQhWuNBF3wJ9AjNXH6EnpeTH2jgz6mW n/n1Ml78y/TmGmSHLld1u1DulxdJguEKnmVDMRMqKCHMwx5mYD4acspxFh5CH+ub7nqjk AiyxWJvY0Qe5EBDoGyZKdIFFHcPv+PJB4lU0pJXsDYKqp/+SSpViGwOaWn4stl4/TeAr2 JS6PcWcDPWaZVl7XLA9bLEJppCL/iBLXbDDSFYxoC+kjpTnyLjkuKapGOfzUV4JQSP3K3 rYZs+1h74GQeMHhjgKfth+crHFoK2pulcAMtmzTrTLV3SKb4vOSKHJUip/ni6vTVIjA== 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="J6/3Ybfd"; 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 5C73F606A32F; Thu, 29 Oct 2026 16:15:19 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCF021F01829; Thu, 29 Oct 2026 16:15:17 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793290519; bh=CV+I0WfjDJ8Xoj3e8ojq5cBu+5LIzM4ObkQfPuSQTBg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=J6/3YbfdXih6LdqmNzf85m3u+79OgsTyL8UXkkYqBpIkTUfwXf5ll4YphhX/1ShMe JoP4HVfHwMgOSiYsP28WRA7TsmqG89V46NfbjZfyHkcOik16O8QD1aKlKxJP2cTNMA DLQPzkk8aWimObKTP3+XXLHgw+lSQZwPG90ujG5FytxuQCIztbURtAlZKoD4y+C8cH Q2GwhF7n7b4fq3s12KOFlUT4lLI7WHB4SgHXexuCMgxOs5csGwjEDj8TnbgcEz/EU3 zbLHa9mOTH9uGUHZCcRuueKo04Wzd/xICRK7l4P/2TdcU29phWPRtigIuPbiJ1zaoW 4W7pWYeeb3nyA== X-Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, hkallweit1@gmail.com, linux@armlinux.org.uk, shaojijie@huawei.com, horms@kernel.org, runyu.xiao@seu.edu.cn, mmyangfl@gmail.com, hvr@gnu.org, jeff@garzik.org, danny.kukawka@bisect.de, mugunthanvnm@ti.com, sebastian.hesselbarth@gmail.com, linux-kernel@vger.kernel.org, manuel.lauss@gmail.com X-In-Reply-To: <20261027223140.3774570-8-f.fainelli@gmail.com> X-sashiko-severity: Low 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