Commit 7be897db authored by Hangyu Hua's avatar Hangyu Hua Committed by Jialin Zhang
Browse files

net: sched: act_ct: fix possible refcount leak in tcf_ct_init()

stable inclusion
from stable-v5.10.147
commit fde656dbc3720f1991631eb678087c6af7a4461b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0W8

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fde656dbc3720f1991631eb678087c6af7a4461b



--------------------------------

[ Upstream commit 6e23ec0b ]

nf_ct_put need to be called to put the refcount got by tcf_ct_fill_params
to avoid possible refcount leak when tcf_ct_flow_table_get fails.

Fixes: c34b961a ("net/sched: act_ct: Create nf flow table per zone")
Signed-off-by: default avatarHangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20220923020046.8021-1-hbh25y@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 3459a712
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment