[PATCH net 07/11] net: au1000: fix buffer descriptor free list insertion
From: Florian Fainelli
Date: Tue Oct 27 2026 - 18:38:50 EST
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")
Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
---
drivers/net/ethernet/amd/au1000_eth.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
index c0e38a507f89..f8976e324f0e 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;
}
--
2.53.0