summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPedro Tammela <pctammela@mojatatu.com>2023-02-27 16:23:52 +0100
committerDavid S. Miller <davem@davemloft.net>2023-03-01 09:19:09 +0100
commitfb07390463c95e6eef254044d6dde050bfb9807a (patch)
treefabf7fde8af78beeb0699bd00428667c56b81eaa /net
parentnet: avoid skb end_offset change in __skb_unclone_keeptruesize() (diff)
downloadlinux-fb07390463c95e6eef254044d6dde050bfb9807a.tar.xz
linux-fb07390463c95e6eef254044d6dde050bfb9807a.zip
net/sched: act_connmark: handle errno on tcf_idr_check_alloc
Smatch reports that 'ci' can be used uninitialized. The current code ignores errno coming from tcf_idr_check_alloc, which will lead to the incorrect usage of 'ci'. Handle the errno as it should. Fixes: 288864effe33 ("net/sched: act_connmark: transition to percpu stats and rcu") Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/act_connmark.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c
index 8dabfb52ea3d..0d7aee8933c5 100644
--- a/net/sched/act_connmark.c
+++ b/net/sched/act_connmark.c
@@ -158,6 +158,9 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla,
nparms->zone = parm->zone;
ret = 0;
+ } else {
+ err = ret;
+ goto out_free;
}
err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack);