git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
net
/
ipv4
/
devinet.c
diff --git
a/net/ipv4/devinet.c
b/net/ipv4/devinet.c
index
cc5dd56
..
ec968e4
100644
(file)
--- a/
net/ipv4/devinet.c
+++ b/
net/ipv4/devinet.c
@@
-31,7
+31,7
@@
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/system.h>
-#include <
asm
/bitops.h>
+#include <
linux
/bitops.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@
-158,8
+158,7
@@
struct in_device *inetdev_init(struct net_device *dev)
/* Account for reference dev->ip_ptr */
in_dev_hold(in_dev);
/* Account for reference dev->ip_ptr */
in_dev_hold(in_dev);
- smp_wmb();
- dev->ip_ptr = in_dev;
+ rcu_assign_pointer(dev->ip_ptr, in_dev);
#ifdef CONFIG_SYSCTL
devinet_sysctl_register(in_dev, &in_dev->cnf);
#ifdef CONFIG_SYSCTL
devinet_sysctl_register(in_dev, &in_dev->cnf);
@@
-381,7
+380,7
@@
struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix,
return NULL;
}
return NULL;
}
-int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+
static
int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
{
struct rtattr **rta = arg;
struct in_device *in_dev;
{
struct rtattr **rta = arg;
struct in_device *in_dev;
@@
-400,7
+399,7
@@
int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
memcmp(RTA_DATA(rta[IFA_LOCAL - 1]),
&ifa->ifa_local, 4)) ||
(rta[IFA_LABEL - 1] &&
memcmp(RTA_DATA(rta[IFA_LOCAL - 1]),
&ifa->ifa_local, 4)) ||
(rta[IFA_LABEL - 1] &&
-
strcmp(RTA_DATA(rta[IFA_LABEL - 1])
, ifa->ifa_label)) ||
+
rtattr_strcmp(rta[IFA_LABEL - 1]
, ifa->ifa_label)) ||
(rta[IFA_ADDRESS - 1] &&
(ifm->ifa_prefixlen != ifa->ifa_prefixlen ||
!inet_ifa_match(*(u32*)RTA_DATA(rta[IFA_ADDRESS - 1]),
(rta[IFA_ADDRESS - 1] &&
(ifm->ifa_prefixlen != ifa->ifa_prefixlen ||
!inet_ifa_match(*(u32*)RTA_DATA(rta[IFA_ADDRESS - 1]),
@@
-413,7
+412,7
@@
out:
return -EADDRNOTAVAIL;
}
return -EADDRNOTAVAIL;
}
-int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
+
static
int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
{
struct rtattr **rta = arg;
struct net_device *dev;
{
struct rtattr **rta = arg;
struct net_device *dev;
@@
-457,7
+456,7
@@
int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
in_dev_hold(in_dev);
ifa->ifa_dev = in_dev;
if (rta[IFA_LABEL - 1])
in_dev_hold(in_dev);
ifa->ifa_dev = in_dev;
if (rta[IFA_LABEL - 1])
-
memcpy(ifa->ifa_label, RTA_DATA(rta[IFA_LABEL - 1])
, IFNAMSIZ);
+
rtattr_strlcpy(ifa->ifa_label, rta[IFA_LABEL - 1]
, IFNAMSIZ);
else
memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
else
memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);