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 --- 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 ea8f7787dd5d..f127c0184036 100644 --- a/drivers/net/ethernet/amd/au1000_eth.c +++ b/drivers/net/ethernet/amd/au1000_eth.c @@ -581,9 +581,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