Commit 4e24ffa4 authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 6662df33
...@@ -125,7 +125,8 @@ int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh, ...@@ -125,7 +125,8 @@ int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh,
unsigned char *prev_tail; unsigned char *prev_tail;
prev_tail = skb_tail_pointer(skb); 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; nlh->nlmsg_len += skb_tail_pointer(skb) - prev_tail;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment