projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a106de
)
macvlan: Stop using NLA_PUT*().
author
David S. Miller
<davem@davemloft.net>
Mon, 2 Apr 2012 00:23:06 +0000
(20:23 -0400)
committer
David S. Miller
<davem@davemloft.net>
Mon, 2 Apr 2012 08:33:43 +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/net/macvlan.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/macvlan.c
b/drivers/net/macvlan.c
index f975afdc315ce507b5a5b80c04325a224849c320..b17fc900709997863ce064b0e007f3014ae2d291 100644
(file)
--- a/
drivers/net/macvlan.c
+++ b/
drivers/net/macvlan.c
@@
-773,7
+773,8
@@
static int macvlan_fill_info(struct sk_buff *skb,
{
struct macvlan_dev *vlan = netdev_priv(dev);
- NLA_PUT_U32(skb, IFLA_MACVLAN_MODE, vlan->mode);
+ if (nla_put_u32(skb, IFLA_MACVLAN_MODE, vlan->mode))
+ goto nla_put_failure;
return 0;
nla_put_failure: