From 449d2acf3d3a41ff1d6e3a74c2f122b70601dd94 Mon Sep 17 00:00:00 2001 From: Animesh Bhatt Date: Mon, 22 Jun 2026 14:48:28 +0530 Subject: [PATCH] [aqc1xx] Free outstanding receive I/O buffers on close atl_close() freed the descriptor rings but left the posted receive I/O buffers allocated, leaking them and tripping an assertion on the next open. Free any outstanding receive I/O buffers in atl_close(). Signed-off-by: Animesh Bhatt --- src/drivers/net/marvell/aqc1xx.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/drivers/net/marvell/aqc1xx.c b/src/drivers/net/marvell/aqc1xx.c index 59445baf3..0ee574fe2 100644 --- a/src/drivers/net/marvell/aqc1xx.c +++ b/src/drivers/net/marvell/aqc1xx.c @@ -262,6 +262,7 @@ err_tx_alloc: */ static void atl_close ( struct net_device *netdev ) { struct atl_nic *nic = netdev->priv; + unsigned int i; nic->hw_ops->stop ( nic ); /* rpb global ctrl */ @@ -282,6 +283,13 @@ static void atl_close ( struct net_device *netdev ) { atl_ring_free ( &nic->tx_ring ); atl_ring_free ( &nic->rx_ring ); + + /* Discard any outstanding receive I/O buffers */ + for ( i = 0 ; i < ATL_RING_SIZE ; i++ ) { + if ( nic->iobufs[i] ) + free_rx_iob ( nic->iobufs[i] ); + nic->iobufs[i] = NULL; + } } /** -- 2.47.3