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:
@@ -247,7 +247,8 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb)
|
||||
opt.offset[i] = dev->tc_to_txq[i].offset;
|
||||
}
|
||||
|
||||
NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
|
||||
if (nla_put(skb, TCA_OPTIONS, sizeof(opt), &opt))
|
||||
goto nla_put_failure;
|
||||
|
||||
return skb->len;
|
||||
nla_put_failure:
|
||||
|
Reference in New Issue
Block a user