octeontx2-pf: Fix leak of SQ timestamp buffer on teardown
Ratheesh Kannoth
maintainerPATCH 1/1 octeontx2-pf: Fix leak of SQ timestamp buffer on teardown
The send-queue timestamp ring is allocated with qmem_alloc() when timestamping is used, but otx2_free_sq_res() never freed sq->timestamps, leaking that memory across ifdown and device removal. Add the missing qmem_free() alongside the other SQ companion buffers.
--- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +1 -0
@@ -1578,6 +1578,7 @@ static void otx2_free_sq_res(struct otx2_nic *pf)qmem_free (pf->dev, sq->sqe_ring);qmem_free (pf->dev, sq->cpt_resp);qmem_free (pf->dev, sq->tso_hdrs); +qmem_free (pf->dev, sq->timestamps);kfree (sq->sg);kfree (sq->sqb_ptrs); }
Signature · 1 line
2.43.0
Quoted 8 lines · Ratheesh Kannoth
The send-queue timestamp ring is allocated with
qmem_alloc()when timestamping is used, butotx2_free_sq_res()never freedsq->timestamps, leaking that memory across ifdown and device removal. Add the missingqmem_free()alongside the other SQ companion buffers.Fixes c9c12d339d93 ("octeontx2-pf: Add support for PTP clock")Cc Aleksey Makarov <[email protected]>Signed-off-by Ratheesh Kannoth <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Mon, 15 Jun 2026 08:37:04 +0530 you wrote:
The send-queue timestamp ring is allocated with
qmem_alloc()when timestamping is used, butotx2_free_sq_res()never freedsq->timestamps, leaking that memory across ifdown and device removal. Add the missingqmem_free()alongside the other SQ companion buffers.Fixes c9c12d339d93 ("octeontx2-pf: Add support for PTP clock")Cc Aleksey Makarov <[email protected]>Signed-off-by Ratheesh Kannoth <[email protected]>[...]
Here is the summary with links:
- [net] octeontx2-pf: Fix leak of SQ timestamp buffer on teardown
https://git.kernel.org/netdev/net/c/a056db30de92
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html