Skip to content

Commit fb07390

Browse files
tammeladavem330
authored andcommitted
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: 288864e ("net/sched: act_connmark: transition to percpu stats and rcu") Reviewed-by: Jamal Hadi Salim <[email protected]> Signed-off-by: Pedro Tammela <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 880ce5f commit fb07390

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/sched/act_connmark.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla,
158158
nparms->zone = parm->zone;
159159

160160
ret = 0;
161+
} else {
162+
err = ret;
163+
goto out_free;
161164
}
162165

163166
err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack);

0 commit comments

Comments
 (0)