[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR18MB52161F73B08DA547F7A8F3B8DB8BA@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Thu, 7 Dec 2023 17:08:15 +0000
From: Suman Ghosh <sumang@...vell.com>
To: Zhipeng Lu <alexious@....edu.cn>
CC: Chris Snook <chris.snook@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Yuanjun Gong <ruc_gongyuanjun@....com>,
Jie Yang <jie.yang@...eros.com>,
Jeff Garzik <jgarzik@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXT] [PATCH] ethernet: atheros: fix a memleak in
atl1e_setup_ring_resources
>diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
>b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
>index 5935be190b9e..deb5a3f207cc 100644
>--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
>+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
>@@ -866,6 +866,7 @@ static int atl1e_setup_ring_resources(struct
>atl1e_adapter *adapter)
> netdev_err(adapter->netdev, "offset(%d) > ring size(%d) !!\n",
> offset, adapter->ring_size);
> err = -1;
>+ kfree(tx_ring->tx_buffer);
[Suman] I think we should do tx_ring->tx_buffer = NULL also, to avoid use after free?
> goto failed;
> }
>
>--
>2.34.1
>
Powered by blists - more mailing lists