[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220510153619.32464-1-ap420073@gmail.com>
Date: Tue, 10 May 2022 15:36:17 +0000
From: Taehee Yoo <ap420073@...il.com>
To: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, ecree.xilinx@...il.com,
habetsm.xilinx@...il.com, netdev@...r.kernel.org
Cc: ap420073@...il.com
Subject: [PATCH net 0/2] net: sfc: fix memory leak in ->mtd_probe() callback
This patchset fixes memory leak in ->mtd_probe() callback.
The goal of ->mtd_probe() callback is to allocate and initialize
mtd partition and this is global data of sfc driver.
If NIC has 2 ports, ->mtd_probe() callback will be called twice.
So it allocates mtd partition twice and last allocated mtd partition data
will not be used.
So it should be freed, but it doesn't.
This patchset contains patches for ef10 and siena device.
But I tested only ef10(X2522-25G).
Siena version of ->mtd_probe() callback is similar to ef10 version.
So I added it.
But falcon version of ->mtd_probe() code looks different.
So I didn't add.
Taehee Yoo (2):
net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe()
net: sfc: siena: fix memory leak in siena_mtd_probe()
drivers/net/ethernet/sfc/ef10.c | 5 +++++
drivers/net/ethernet/sfc/siena.c | 5 +++++
2 files changed, 10 insertions(+)
--
2.17.1
Powered by blists - more mailing lists