diff options
author | Olof Johansson <olof@lixom.net> | 2012-02-07 18:04:15 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-02-07 18:05:20 -0500 |
commit | a5f17d1f4c2831b9b9bf8b1a537cdbac995d6e13 (patch) | |
tree | cce7eab28de00a88d75b8eda704f5838e10947b1 /net/core | |
parent | dcf81c1af839b77b44404453ecae6e5ac5a75f05 (diff) | |
parent | 62aa2b537c6f5957afd98e29f96897419ed5ebab (diff) |
Merge tag 'v3.3-rc2' into depends/rmk/for-armsoc
There were conflicts between fixes going in after 3.3-rc1 and
Russell's stable arm-soc base branch. Resolving it in the dependency
branch so that each topic branch shares the same resolution.
Conflicts:
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91sam9g45.c
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/ethtool.c | 1 | ||||
-rw-r--r-- | net/core/flow_dissector.c | 1 | ||||
-rw-r--r-- | net/core/net_namespace.c | 31 | ||||
-rw-r--r-- | net/core/pktgen.c | 4 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 3 | ||||
-rw-r--r-- | net/core/sock.c | 4 |
6 files changed, 25 insertions, 19 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 921aa2b4b415..369b41894527 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -1311,6 +1311,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
1311 | case ETHTOOL_GRXCSUM: | 1311 | case ETHTOOL_GRXCSUM: |
1312 | case ETHTOOL_GTXCSUM: | 1312 | case ETHTOOL_GTXCSUM: |
1313 | case ETHTOOL_GSG: | 1313 | case ETHTOOL_GSG: |
1314 | case ETHTOOL_GSSET_INFO: | ||
1314 | case ETHTOOL_GSTRINGS: | 1315 | case ETHTOOL_GSTRINGS: |
1315 | case ETHTOOL_GTSO: | 1316 | case ETHTOOL_GTSO: |
1316 | case ETHTOOL_GPERMADDR: | 1317 | case ETHTOOL_GPERMADDR: |
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 0985b9b14b80..a225089df5b6 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/skbuff.h> | 1 | #include <linux/skbuff.h> |
2 | #include <linux/export.h> | ||
2 | #include <linux/ip.h> | 3 | #include <linux/ip.h> |
3 | #include <linux/ipv6.h> | 4 | #include <linux/ipv6.h> |
4 | #include <linux/if_vlan.h> | 5 | #include <linux/if_vlan.h> |
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index aefcd7acbffa..0e950fda9a0a 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -30,6 +30,20 @@ EXPORT_SYMBOL(init_net); | |||
30 | 30 | ||
31 | #define INITIAL_NET_GEN_PTRS 13 /* +1 for len +2 for rcu_head */ | 31 | #define INITIAL_NET_GEN_PTRS 13 /* +1 for len +2 for rcu_head */ |
32 | 32 | ||
33 | static unsigned int max_gen_ptrs = INITIAL_NET_GEN_PTRS; | ||
34 | |||
35 | static struct net_generic *net_alloc_generic(void) | ||
36 | { | ||
37 | struct net_generic *ng; | ||
38 | size_t generic_size = offsetof(struct net_generic, ptr[max_gen_ptrs]); | ||
39 | |||
40 | ng = kzalloc(generic_size, GFP_KERNEL); | ||
41 | if (ng) | ||
42 | ng->len = max_gen_ptrs; | ||
43 | |||
44 | return ng; | ||
45 | } | ||
46 | |||
33 | static int net_assign_generic(struct net *net, int id, void *data) | 47 | static int net_assign_generic(struct net *net, int id, void *data) |
34 | { | 48 | { |
35 | struct net_generic *ng, *old_ng; | 49 | struct net_generic *ng, *old_ng; |
@@ -43,8 +57,7 @@ static int net_assign_generic(struct net *net, int id, void *data) | |||
43 | if (old_ng->len >= id) | 57 | if (old_ng->len >= id) |
44 | goto assign; | 58 | goto assign; |
45 | 59 | ||
46 | ng = kzalloc(sizeof(struct net_generic) + | 60 | ng = net_alloc_generic(); |
47 | id * sizeof(void *), GFP_KERNEL); | ||
48 | if (ng == NULL) | 61 | if (ng == NULL) |
49 | return -ENOMEM; | 62 | return -ENOMEM; |
50 | 63 | ||
@@ -59,7 +72,6 @@ static int net_assign_generic(struct net *net, int id, void *data) | |||
59 | * the old copy for kfree after a grace period. | 72 | * the old copy for kfree after a grace period. |
60 | */ | 73 | */ |
61 | 74 | ||
62 | ng->len = id; | ||
63 | memcpy(&ng->ptr, &old_ng->ptr, old_ng->len * sizeof(void*)); | 75 | memcpy(&ng->ptr, &old_ng->ptr, old_ng->len * sizeof(void*)); |
64 | 76 | ||
65 | rcu_assign_pointer(net->gen, ng); | 77 | rcu_assign_pointer(net->gen, ng); |
@@ -161,18 +173,6 @@ out_undo: | |||
161 | goto out; | 173 | goto out; |
162 | } | 174 | } |
163 | 175 | ||
164 | static struct net_generic *net_alloc_generic(void) | ||
165 | { | ||
166 | struct net_generic *ng; | ||
167 | size_t generic_size = sizeof(struct net_generic) + | ||
168 | INITIAL_NET_GEN_PTRS * sizeof(void *); | ||
169 | |||
170 | ng = kzalloc(generic_size, GFP_KERNEL); | ||
171 | if (ng) | ||
172 | ng->len = INITIAL_NET_GEN_PTRS; | ||
173 | |||
174 | return ng; | ||
175 | } | ||
176 | 176 | ||
177 | #ifdef CONFIG_NET_NS | 177 | #ifdef CONFIG_NET_NS |
178 | static struct kmem_cache *net_cachep; | 178 | static struct kmem_cache *net_cachep; |
@@ -483,6 +483,7 @@ again: | |||
483 | } | 483 | } |
484 | return error; | 484 | return error; |
485 | } | 485 | } |
486 | max_gen_ptrs = max_t(unsigned int, max_gen_ptrs, *ops->id); | ||
486 | } | 487 | } |
487 | error = __register_pernet_operations(list, ops); | 488 | error = __register_pernet_operations(list, ops); |
488 | if (error) { | 489 | if (error) { |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 65f80c7b1656..4d8ce93cd503 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -767,8 +767,8 @@ done: | |||
767 | return i; | 767 | return i; |
768 | } | 768 | } |
769 | 769 | ||
770 | static unsigned long num_arg(const char __user * user_buffer, | 770 | static long num_arg(const char __user *user_buffer, unsigned long maxlen, |
771 | unsigned long maxlen, unsigned long *num) | 771 | unsigned long *num) |
772 | { | 772 | { |
773 | int i; | 773 | int i; |
774 | *num = 0; | 774 | *num = 0; |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index f16444bc6cbb..65aebd450027 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1509,6 +1509,9 @@ errout: | |||
1509 | 1509 | ||
1510 | if (send_addr_notify) | 1510 | if (send_addr_notify) |
1511 | call_netdevice_notifiers(NETDEV_CHANGEADDR, dev); | 1511 | call_netdevice_notifiers(NETDEV_CHANGEADDR, dev); |
1512 | min_ifinfo_dump_size = max_t(u16, if_nlmsg_size(dev), | ||
1513 | min_ifinfo_dump_size); | ||
1514 | |||
1512 | return err; | 1515 | return err; |
1513 | } | 1516 | } |
1514 | 1517 | ||
diff --git a/net/core/sock.c b/net/core/sock.c index 5c5af9988f94..3e81fd2e3c75 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1827,7 +1827,7 @@ suppress_allocation: | |||
1827 | /* Alas. Undo changes. */ | 1827 | /* Alas. Undo changes. */ |
1828 | sk->sk_forward_alloc -= amt * SK_MEM_QUANTUM; | 1828 | sk->sk_forward_alloc -= amt * SK_MEM_QUANTUM; |
1829 | 1829 | ||
1830 | sk_memory_allocated_sub(sk, amt, parent_status); | 1830 | sk_memory_allocated_sub(sk, amt); |
1831 | 1831 | ||
1832 | return 0; | 1832 | return 0; |
1833 | } | 1833 | } |
@@ -1840,7 +1840,7 @@ EXPORT_SYMBOL(__sk_mem_schedule); | |||
1840 | void __sk_mem_reclaim(struct sock *sk) | 1840 | void __sk_mem_reclaim(struct sock *sk) |
1841 | { | 1841 | { |
1842 | sk_memory_allocated_sub(sk, | 1842 | sk_memory_allocated_sub(sk, |
1843 | sk->sk_forward_alloc >> SK_MEM_QUANTUM_SHIFT, 0); | 1843 | sk->sk_forward_alloc >> SK_MEM_QUANTUM_SHIFT); |
1844 | sk->sk_forward_alloc &= SK_MEM_QUANTUM - 1; | 1844 | sk->sk_forward_alloc &= SK_MEM_QUANTUM - 1; |
1845 | 1845 | ||
1846 | if (sk_under_memory_pressure(sk) && | 1846 | if (sk_under_memory_pressure(sk) && |