Skip to content

Commit 19d2d36

Browse files
rkannoth1gregkh
authored andcommitted
octeontx2-pf: Fix leak of SQ timestamp buffer on teardown
[ Upstream commit a056db3 ] 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. Fixes: c9c12d3 ("octeontx2-pf: Add support for PTP clock") Cc: Aleksey Makarov <amakarov@marvell.com> Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260615030704.504536-1-rkannoth@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent cfbffc8 commit 19d2d36

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/net/ethernet/marvell/octeontx2/nic

drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,6 +1448,7 @@ static void otx2_free_sq_res(struct otx2_nic *pf)
14481448
continue;
14491449
qmem_free(pf->dev, sq->sqe);
14501450
qmem_free(pf->dev, sq->tso_hdrs);
1451+
qmem_free(pf->dev, sq->timestamps);
14511452
kfree(sq->sg);
14521453
kfree(sq->sqb_ptrs);
14531454
}

0 commit comments

Comments
 (0)