Commit fb073904 authored by Pedro Tammela's avatar Pedro Tammela Committed by David S. Miller

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: 288864ef ("net/sched: act_connmark: transition to percpu stats and rcu")
Reviewed-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 880ce5f2
...@@ -158,6 +158,9 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla, ...@@ -158,6 +158,9 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla,
nparms->zone = parm->zone; nparms->zone = parm->zone;
ret = 0; ret = 0;
} else {
err = ret;
goto out_free;
} }
err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment