This is a note to let you know that I've just added the patch titled octeontx2-af: fix the double free in rvu_npc_freemem() to the 6.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: octeontx2-af-fix-the-double-free-in-rvu_npc_freemem.patch and it can be found in the queue-6.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 07cde3b6c8b008ec865863c3e9a58fb17944a1a1 Author: Su Hui <suhui@xxxxxxxxxxxx> Date: Wed Apr 24 10:27:25 2024 +0800 octeontx2-af: fix the double free in rvu_npc_freemem() [ Upstream commit 6e965eba43e9724f3e603d7b7cc83e53b23d155e ] Clang static checker(scan-build) warning: drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c:line 2184, column 2 Attempt to free released memory. npc_mcam_rsrcs_deinit() has released 'mcam->counters.bmap'. Deleted this redundant kfree() to fix this double free problem. Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs") Signed-off-by: Su Hui <suhui@xxxxxxxxxxxx> Reviewed-by: Geetha sowjanya <gakula@xxxxxxxxxxx> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@xxxxxxxxxxxx> Reviewed-by: Hariprasad Kelam <hkelam@xxxxxxxxxxx> Link: https://lore.kernel.org/r/20240424022724.144587-1-suhui@xxxxxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c index 42b5ed02bc87f..d94b7b88e14ca 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c @@ -2181,7 +2181,6 @@ void rvu_npc_freemem(struct rvu *rvu) kfree(pkind->rsrc.bmap); npc_mcam_rsrcs_deinit(rvu); - kfree(mcam->counters.bmap); if (rvu->kpu_prfl_addr) iounmap(rvu->kpu_prfl_addr); else