Skip to content

Commit 49c2cfd

Browse files
committed
Merge: octeontx2-af: fix the double free in rvu_npc_freemem()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4505 JIRA: https://issues.redhat.com/browse/RHEL-39651 CVE: CVE-2024-36030 Conflicts: Minor context diff due to the missing of the following commit: dd78428 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs") commit 6e965eb Author: Su Hui <suhui@nfschina.com> Date: Wed Apr 24 10:27:25 2024 +0800 octeontx2-af: fix the double free in rvu_npc_freemem() 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: dd78428 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs") Signed-off-by: Su Hui <suhui@nfschina.com> Reviewed-by: Geetha sowjanya <gakula@marvell.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Hariprasad Kelam <hkelam@marvell.com> Link: https://lore.kernel.org/r/20240424022724.144587-1-suhui@nfschina.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Kamal Heib <kheib@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: John B. Wyatt IV <jwyatt@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents a08fd58 + bc54c41 commit 49c2cfd

File tree

1 file changed

+0
-1
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+0
-1
lines changed

drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,6 @@ void rvu_npc_freemem(struct rvu *rvu)
21242124
struct npc_mcam *mcam = &rvu->hw->mcam;
21252125

21262126
kfree(pkind->rsrc.bmap);
2127-
kfree(mcam->counters.bmap);
21282127
if (rvu->kpu_prfl_addr)
21292128
iounmap(rvu->kpu_prfl_addr);
21302129
else

0 commit comments

Comments
 (0)