[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<CH0PR18MB4339B5AE1813587AA743C78ACD102@CH0PR18MB4339.namprd18.prod.outlook.com>
Date: Wed, 24 Apr 2024 04:05:24 +0000
From: Geethasowjanya Akula <gakula@...vell.com>
To: Su Hui <suhui@...china.com>, Sunil Kovvuri Goutham <sgoutham@...vell.com>,
Linu Cherian <lcherian@...vell.com>, Jerin Jacob <jerinj@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>,
Subbaraya Sundeep Bhatta
<sbhatta@...vell.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org"
<kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"nathan@...nel.org" <nathan@...nel.org>,
"ndesaulniers@...gle.com"
<ndesaulniers@...gle.com>,
"morbo@...gle.com" <morbo@...gle.com>,
"justinstitt@...gle.com" <justinstitt@...gle.com>
CC: Suman Ghosh <sumang@...vell.com>,
"netdev@...r.kernel.org"
<netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>,
"llvm@...ts.linux.dev"
<llvm@...ts.linux.dev>,
"kernel-janitors@...r.kernel.org"
<kernel-janitors@...r.kernel.org>
Subject: RE: [EXTERNAL] [PATCH net] octeontx2-af: fix the double free in
rvu_npc_freemem()
> -----Original Message-----
> From: Su Hui <suhui@...china.com>
> Sent: Wednesday, April 24, 2024 7:57 AM
> To: Sunil Kovvuri Goutham <sgoutham@...vell.com>; Linu Cherian
> <lcherian@...vell.com>; Geethasowjanya Akula <gakula@...vell.com>;
> Jerin Jacob <jerinj@...vell.com>; Hariprasad Kelam
> <hkelam@...vell.com>; Subbaraya Sundeep Bhatta
> <sbhatta@...vell.com>; davem@...emloft.net; edumazet@...gle.com;
> kuba@...nel.org; pabeni@...hat.com; nathan@...nel.org;
> ndesaulniers@...gle.com; morbo@...gle.com; justinstitt@...gle.com
> Cc: Su Hui <suhui@...china.com>; Suman Ghosh <sumang@...vell.com>;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org; llvm@...ts.linux.dev;
> kernel-janitors@...r.kernel.org
> Subject: [EXTERNAL] [PATCH net] 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: dd7842878633 ("octeontx2-af: Add new devlink param to configure
> maximum usable NIX block LFs")
> Signed-off-by: Su Hui <suhui@...china.com>
> ---
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
> index be709f83f331..e8b73b9d75e3 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
> --
> 2.30.2
Reviewed-by: Geetha sowjanya <gakula@...vell.com>
Powered by blists - more mailing lists