diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-01 20:47:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-02 04:33:44 -0400 |
commit | 14ad6647f3c919b4ee987e2058fbc6c10f29bb53 (patch) | |
tree | 869d184a3b3734874acb03665a122bd125e10ae8 /net/core | |
parent | 0e3cea7b3cdb2344919e96b3af33de64736ae3a3 (diff) |
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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/gen_stats.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c index 0452eb27a272..ddedf211e588 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c | |||
@@ -27,7 +27,8 @@ | |||
27 | static inline int | 27 | static inline int |
28 | gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size) | 28 | gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size) |
29 | { | 29 | { |
30 | NLA_PUT(d->skb, type, size, buf); | 30 | if (nla_put(d->skb, type, size, buf)) |
31 | goto nla_put_failure; | ||
31 | return 0; | 32 | return 0; |
32 | 33 | ||
33 | nla_put_failure: | 34 | nla_put_failure: |