mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
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: 288864effe
("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>
This commit is contained in:
parent
880ce5f200
commit
fb07390463
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user