aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index a1b356c8aa59..2fd899160f85 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1564,12 +1564,12 @@ static void devinet_sysctl_register(struct in_device *in_dev,
1564{ 1564{
1565 int i; 1565 int i;
1566 struct net_device *dev = in_dev ? in_dev->dev : NULL; 1566 struct net_device *dev = in_dev ? in_dev->dev : NULL;
1567 struct devinet_sysctl_table *t = kmalloc(sizeof(*t), GFP_KERNEL); 1567 struct devinet_sysctl_table *t = kmemdup(&devinet_sysctl, sizeof(*t),
1568 GFP_KERNEL);
1568 char *dev_name = NULL; 1569 char *dev_name = NULL;
1569 1570
1570 if (!t) 1571 if (!t)
1571 return; 1572 return;
1572 memcpy(t, &devinet_sysctl, sizeof(*t));
1573 for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) { 1573 for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) {
1574 t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf; 1574 t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf;
1575 t->devinet_vars[i].de = NULL; 1575 t->devinet_vars[i].de = NULL;