From: David S. Miller Date: Mon, 2 Apr 2012 00:47:35 +0000 (-0400) Subject: gen_stats: Stop using NLA_PUT*(). X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=14ad6647f3c919b4ee987e2058fbc6c10f29bb53;p=~shefty%2Frdma-dev.git 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 --- diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c index 0452eb27a27..ddedf211e58 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c @@ -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: