projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6662df3
)
infiniband: Stop using NLA_PUT*().
author
David S. Miller
<davem@davemloft.net>
Mon, 2 Apr 2012 00:19:38 +0000
(20:19 -0400)
committer
David S. Miller
<davem@davemloft.net>
Mon, 2 Apr 2012 08:33:42 +0000
(
04:33
-0400)
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>
drivers/infiniband/core/netlink.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/infiniband/core/netlink.c
b/drivers/infiniband/core/netlink.c
index 396e293703040938b2459a3c53e022d9444a702d..e497dfbee4352c99b8fdafba40ccfa4aff1e367f 100644
(file)
--- 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;