]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/ipv6/addrconf.c
[NETLINK]: Remove unused dst_pid field in netlink_skb_parms
[mirror_ubuntu-bionic-kernel.git] / net / ipv6 / addrconf.c
index 052f99eaf2ac90eb275cfac7875b3ef645c939c6..a5e8d207a51b72eb1c3ae4a65bd1f825f4d7100f 100644 (file)
@@ -232,7 +232,7 @@ static inline unsigned ipv6_addr_scope2type(unsigned scope)
 
 int __ipv6_addr_type(const struct in6_addr *addr)
 {
-       u32 st;
+       __be32 st;
 
        st = addr->s6_addr32[0];
 
@@ -3969,10 +3969,9 @@ static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf
        struct addrconf_sysctl_table *t;
        char *dev_name = NULL;
 
-       t = kmalloc(sizeof(*t), GFP_KERNEL);
+       t = kmemdup(&addrconf_sysctl, sizeof(*t), GFP_KERNEL);
        if (t == NULL)
                return;
-       memcpy(t, &addrconf_sysctl, sizeof(*t));
        for (i=0; t->addrconf_vars[i].data; i++) {
                t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf;
                t->addrconf_vars[i].de = NULL;