提交 14ad6647 编写于 作者: D David S. Miller

gen_stats: 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: NDavid S. Miller <davem@davemloft.net>
上级 0e3cea7b
......@@ -27,7 +27,8 @@
static inline int
gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size)
{
NLA_PUT(d->skb, type, size, buf);
if (nla_put(d->skb, type, size, buf))
goto nla_put_failure;
return 0;
nla_put_failure:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册