summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-04-01 20:19:38 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-02 04:33:42 -0400
commit4e24ffa4d9fed762147c954755f8cb124e85740a (patch)
tree2fc068defe8cb4f45df31650f7e3d262f5e89ba7 /drivers/infiniband
parent6662df33f85b87bb29f2ecad124efe7bb2c08e05 (diff)
downloadtalos-obmc-linux-4e24ffa4d9fed762147c954755f8cb124e85740a.tar.gz
talos-obmc-linux-4e24ffa4d9fed762147c954755f8cb124e85740a.zip
infiniband: 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 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 396e29370304..e497dfbee435 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -125,7 +125,8 @@ int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh,
unsigned char *prev_tail;
prev_tail = skb_tail_pointer(skb);
- NLA_PUT(skb, type, len, data);
+ if (nla_put(skb, type, len, data))
+ goto nla_put_failure;
nlh->nlmsg_len += skb_tail_pointer(skb) - prev_tail;
return 0;
OpenPOWER on IntegriCloud