You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
netfilter: nf_tables: fix percpu memory leak at nf_tables_addchain()
[ Upstream commit9a4d6dd554] It seems to me that percpu memory for chain stats started leaking since commit3bc158f8d0("netfilter: nf_tables: map basechain priority to hardware priority") when nft_chain_offload_priority() returned an error. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Fixes:3bc158f8d0("netfilter: nf_tables: map basechain priority to hardware priority") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
710e3f526b
commit
b043a525a3
@@ -2045,6 +2045,7 @@ static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 genmask,
|
||||
if (err < 0) {
|
||||
nft_chain_release_hook(&hook);
|
||||
kfree(basechain);
|
||||
free_percpu(stats);
|
||||
return err;
|
||||
}
|
||||
if (stats)
|
||||
|
||||
Reference in New Issue
Block a user