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:
@@ -512,7 +512,8 @@ static int pfifo_fast_dump(struct Qdisc *qdisc, struct sk_buff *skb)
|
||||
struct tc_prio_qopt opt = { .bands = PFIFO_FAST_BANDS };
|
||||
|
||||
memcpy(&opt.priomap, prio2band, TC_PRIO_MAX + 1);
|
||||
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