pkt_sched: Stop using NLA_PUT*().
These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@ -257,8 +257,9 @@ static int basic_dump(struct tcf_proto *tp, unsigned long fh,
|
||||
if (nest == NULL)
|
||||
goto nla_put_failure;
|
||||
|
||||
if (f->res.classid)
|
||||
NLA_PUT_U32(skb, TCA_BASIC_CLASSID, f->res.classid);
|
||||
if (f->res.classid &&
|
||||
nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid))
|
||||
goto nla_put_failure;
|
||||
|
||||
if (tcf_exts_dump(skb, &f->exts, &basic_ext_map) < 0 ||
|
||||
tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0)
|
||||
|
Reference in New Issue
Block a user