diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-23 02:47:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-23 02:47:42 -0400 |
commit | db10accfd266a93149cd21cd75026aa03c635e7e (patch) | |
tree | 4397d7e7844248df49e44781d0e1dac5c066257f /include | |
parent | 294d31e8227c9892a89d6b3e58d17886b79ea4e6 (diff) | |
parent | f11a5bc148a313ad37c361c87c9aff2331a8b149 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
"Sorry I let so much accumulate, I was in Buffalo and wanted a few
things to cook in my tree for a while before sending to you. Anyways,
it's a lot of little things as usual at this stage in the game"
1) Make bonding MAINTAINERS entry reflect reality, from Andy
Gospodarek.
2) Fix accidental sock_put() on timewait mini sockets, from Eric
Dumazet.
3) Fix crashes in l2tp due to mis-handling of ipv4 mapped ipv6
addresses, from François CACHEREUL.
4) Fix heap overflow in __audit_sockaddr(), from the eagle eyed Dan
Carpenter.
5) tcp_shifted_skb() doesn't take handle FINs properly, from Eric
Dumazet.
6) SFC driver bug fixes from Ben Hutchings.
7) Fix TX packet scheduling wedge after channel change in ath9k driver,
from Felix Fietkau.
8) Fix user after free in BPF JIT code, from Alexei Starovoitov.
9) Source address selection test is reversed in
__ip_route_output_key(), fix from Jiri Benc.
10) VLAN and CAN layer mis-size netlink attributes, from Marc
Kleine-Budde.
11) Fix permission checks in sysctls to use current_euid() instead of
current_uid(). From Eric W Biederman.
12) IPSEC policies can go away while a timer is still pending for them,
add appropriate ref-counting to fix, from Steffen Klassert.
13) Fix mis-programming of FDR and RMCR registers on R8A7740 sh_eth
chips, from Nguyen Hong Ky and Simon Horman.
14) MLX4 forgets to DMA unmap pages on RX, fix from Amir Vadai.
15) IPV6 GRE tunnel MTU upper limit is miscalculated, from Oussama
Ghorbel.
16) Fix typo in fq_change(), we were assigning "initial quantum" to
"quantum". From Eric Dumazet.
17) Set a more appropriate sk_pacing_rate for non-TCP sockets, otherwise
FQ packet scheduler does not pace those flows properly. Also from
Eric Dumazet.
18) rtlwifi miscalculates packet pointers, from Mark Cave-Ayland.
19) l2tp_xmit_skb() can be called from process context, not just softirq
context, so we must always make sure to BH disable around it. From
Eric Dumazet.
20) On qdisc reset, we forget to purge the RB tree of SKBs in netem
packet scheduler. From Stephen Hemminger.
21) Fix info leak in farsync WAN driver ioctl() handler, from Dan
Carpenter and Salva Peiró.
22) Fix PHY reset and other issues in dm9000 driver, from Nikita
Kiryanov and Michael Abbott.
23) When hardware can do SCTP crc32 checksums, we accidently don't
disable the csum offload when IPSEC transformations have been
applied. From Fan Du and Vlad Yasevich.
24) Tail loss probing in TCP leaves the socket in the wrong congestion
avoidance state. From Yuchung Cheng.
25) In CPSW driver, enable NAPI before interrupts are turned on, from
Markus Pargmann.
26) Integer underflow and dual-assignment in YAM hamradio driver, from
Dan Carpenter.
27) If we are going to mangle a packet in tcp_set_skb_tso_segs() we must
unclone it. This fixes various hard to track down crashes in
drivers where the SKBs ->gso_segs was changing right from underneath
the driver during TX queueing. From Eric Dumazet.
28) Fix the handling of VLAN IDs, and in particular the special IDs 0
and 4095, in the bridging layer. From Toshiaki Makita.
29) Another info leak, this time in wanxl WAN driver, from Salva Peiró.
30) Fix race in socket credential passing, from Daniel Borkmann.
31) WHen NETLABEL is disabled, we don't validate CIPSO packets properly,
from Seif Mazareeb.
32) Fix identification of fragmented frames in ipv4/ipv6 UDP
Fragmentation Offload output paths, from Jiri Pirko.
33) Virtual Function fixes in bnx2x driver from Yuval Mintz and Ariel
Elior.
34) When we removed the explicit neighbour pointer from ipv6 routes a
slight regression was introduced for users such as IPVS, xt_TEE, and
raw sockets. We mix up the users requested destination address with
the routes assigned nexthop/gateway. From Julian Anastasov and
Simon Horman.
35) Fix stack overruns in rt6_probe(), the issue is that can end up
doing two full packet xmit paths at the same time when emitting
neighbour discovery messages. From Hannes Frederic Sowa.
36) davinci_emac driver doesn't handle IFF_ALLMULTI correctly, from
Mariusz Ceier.
37) Make sure to set TCP sk_pacing_rate after the first legitimate RTT
sample, from Neal Cardwell.
38) Wrong netlink attribute passed to xfrm_replay_verify_len(), from
Steffen Klassert.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (152 commits)
ax88179_178a: Add VID:DID for Samsung USB Ethernet Adapter
ax88179_178a: Correct the RX error definition in RX header
Revert "bridge: only expire the mdb entry when query is received"
tcp: initialize passive-side sk_pacing_rate after 3WHS
davinci_emac.c: Fix IFF_ALLMULTI setup
mac802154: correct a typo in ieee802154_alloc_device() prototype
ipv6: probe routes asynchronous in rt6_probe
netfilter: nf_conntrack: fix rt6i_gateway checks for H.323 helper
ipv6: fill rt6i_gateway with nexthop address
ipv6: always prefer rt6i_gateway if present
bnx2x: Set NETIF_F_HIGHDMA unconditionally
bnx2x: Don't pretend during register dump
bnx2x: Lock DMAE when used by statistic flow
bnx2x: Prevent null pointer dereference on error flow
bnx2x: Fix config when SR-IOV and iSCSI are enabled
bnx2x: Fix Coalescing configuration
bnx2x: Unlock VF-PF channel on MAC/VLAN config error
bnx2x: Prevent an illegal pointer dereference during panic
bnx2x: Fix Maximum CoS estimation for VFs
drivers: net: cpsw: fix kernel warn during iperf test with interrupt pacing
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/filter.h | 15 | ||||
-rw-r--r-- | include/linux/netdevice.h | 5 | ||||
-rw-r--r-- | include/linux/yam.h | 2 | ||||
-rw-r--r-- | include/net/cipso_ipv4.h | 6 | ||||
-rw-r--r-- | include/net/dst.h | 12 | ||||
-rw-r--r-- | include/net/ip6_route.h | 6 | ||||
-rw-r--r-- | include/net/mac802154.h | 2 | ||||
-rw-r--r-- | include/net/sock.h | 6 | ||||
-rw-r--r-- | include/uapi/linux/tc_act/Kbuild | 1 | ||||
-rw-r--r-- | include/uapi/linux/tc_act/tc_defact.h (renamed from include/linux/tc_act/tc_defact.h) | 2 |
10 files changed, 38 insertions, 19 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index a6ac84871d6d..ff4e40cd45b1 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/atomic.h> | 7 | #include <linux/atomic.h> |
8 | #include <linux/compat.h> | 8 | #include <linux/compat.h> |
9 | #include <linux/workqueue.h> | ||
9 | #include <uapi/linux/filter.h> | 10 | #include <uapi/linux/filter.h> |
10 | 11 | ||
11 | #ifdef CONFIG_COMPAT | 12 | #ifdef CONFIG_COMPAT |
@@ -25,15 +26,19 @@ struct sk_filter | |||
25 | { | 26 | { |
26 | atomic_t refcnt; | 27 | atomic_t refcnt; |
27 | unsigned int len; /* Number of filter blocks */ | 28 | unsigned int len; /* Number of filter blocks */ |
29 | struct rcu_head rcu; | ||
28 | unsigned int (*bpf_func)(const struct sk_buff *skb, | 30 | unsigned int (*bpf_func)(const struct sk_buff *skb, |
29 | const struct sock_filter *filter); | 31 | const struct sock_filter *filter); |
30 | struct rcu_head rcu; | 32 | union { |
31 | struct sock_filter insns[0]; | 33 | struct sock_filter insns[0]; |
34 | struct work_struct work; | ||
35 | }; | ||
32 | }; | 36 | }; |
33 | 37 | ||
34 | static inline unsigned int sk_filter_len(const struct sk_filter *fp) | 38 | static inline unsigned int sk_filter_size(unsigned int proglen) |
35 | { | 39 | { |
36 | return fp->len * sizeof(struct sock_filter) + sizeof(*fp); | 40 | return max(sizeof(struct sk_filter), |
41 | offsetof(struct sk_filter, insns[proglen])); | ||
37 | } | 42 | } |
38 | 43 | ||
39 | extern int sk_filter(struct sock *sk, struct sk_buff *skb); | 44 | extern int sk_filter(struct sock *sk, struct sk_buff *skb); |
@@ -67,11 +72,13 @@ static inline void bpf_jit_dump(unsigned int flen, unsigned int proglen, | |||
67 | } | 72 | } |
68 | #define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) | 73 | #define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) |
69 | #else | 74 | #else |
75 | #include <linux/slab.h> | ||
70 | static inline void bpf_jit_compile(struct sk_filter *fp) | 76 | static inline void bpf_jit_compile(struct sk_filter *fp) |
71 | { | 77 | { |
72 | } | 78 | } |
73 | static inline void bpf_jit_free(struct sk_filter *fp) | 79 | static inline void bpf_jit_free(struct sk_filter *fp) |
74 | { | 80 | { |
81 | kfree(fp); | ||
75 | } | 82 | } |
76 | #define SK_RUN_FILTER(FILTER, SKB) sk_run_filter(SKB, FILTER->insns) | 83 | #define SK_RUN_FILTER(FILTER, SKB) sk_run_filter(SKB, FILTER->insns) |
77 | #endif | 84 | #endif |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3de49aca4519..25f5d2d11e7c 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2264,11 +2264,12 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | |||
2264 | } | 2264 | } |
2265 | 2265 | ||
2266 | #ifdef CONFIG_XPS | 2266 | #ifdef CONFIG_XPS |
2267 | extern int netif_set_xps_queue(struct net_device *dev, struct cpumask *mask, | 2267 | extern int netif_set_xps_queue(struct net_device *dev, |
2268 | const struct cpumask *mask, | ||
2268 | u16 index); | 2269 | u16 index); |
2269 | #else | 2270 | #else |
2270 | static inline int netif_set_xps_queue(struct net_device *dev, | 2271 | static inline int netif_set_xps_queue(struct net_device *dev, |
2271 | struct cpumask *mask, | 2272 | const struct cpumask *mask, |
2272 | u16 index) | 2273 | u16 index) |
2273 | { | 2274 | { |
2274 | return 0; | 2275 | return 0; |
diff --git a/include/linux/yam.h b/include/linux/yam.h index 7fe28228b274..512cdc2fb80f 100644 --- a/include/linux/yam.h +++ b/include/linux/yam.h | |||
@@ -77,6 +77,6 @@ struct yamdrv_ioctl_cfg { | |||
77 | 77 | ||
78 | struct yamdrv_ioctl_mcs { | 78 | struct yamdrv_ioctl_mcs { |
79 | int cmd; | 79 | int cmd; |
80 | int bitrate; | 80 | unsigned int bitrate; |
81 | unsigned char bits[YAM_FPGA_SIZE]; | 81 | unsigned char bits[YAM_FPGA_SIZE]; |
82 | }; | 82 | }; |
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h index a7a683e30b64..a8c2ef6d3b93 100644 --- a/include/net/cipso_ipv4.h +++ b/include/net/cipso_ipv4.h | |||
@@ -290,6 +290,7 @@ static inline int cipso_v4_validate(const struct sk_buff *skb, | |||
290 | unsigned char err_offset = 0; | 290 | unsigned char err_offset = 0; |
291 | u8 opt_len = opt[1]; | 291 | u8 opt_len = opt[1]; |
292 | u8 opt_iter; | 292 | u8 opt_iter; |
293 | u8 tag_len; | ||
293 | 294 | ||
294 | if (opt_len < 8) { | 295 | if (opt_len < 8) { |
295 | err_offset = 1; | 296 | err_offset = 1; |
@@ -302,11 +303,12 @@ static inline int cipso_v4_validate(const struct sk_buff *skb, | |||
302 | } | 303 | } |
303 | 304 | ||
304 | for (opt_iter = 6; opt_iter < opt_len;) { | 305 | for (opt_iter = 6; opt_iter < opt_len;) { |
305 | if (opt[opt_iter + 1] > (opt_len - opt_iter)) { | 306 | tag_len = opt[opt_iter + 1]; |
307 | if ((tag_len == 0) || (opt[opt_iter + 1] > (opt_len - opt_iter))) { | ||
306 | err_offset = opt_iter + 1; | 308 | err_offset = opt_iter + 1; |
307 | goto out; | 309 | goto out; |
308 | } | 310 | } |
309 | opt_iter += opt[opt_iter + 1]; | 311 | opt_iter += tag_len; |
310 | } | 312 | } |
311 | 313 | ||
312 | out: | 314 | out: |
diff --git a/include/net/dst.h b/include/net/dst.h index 3bc4865f8267..3c4c944096c9 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -479,10 +479,22 @@ static inline struct dst_entry *xfrm_lookup(struct net *net, | |||
479 | { | 479 | { |
480 | return dst_orig; | 480 | return dst_orig; |
481 | } | 481 | } |
482 | |||
483 | static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst) | ||
484 | { | ||
485 | return NULL; | ||
486 | } | ||
487 | |||
482 | #else | 488 | #else |
483 | extern struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig, | 489 | extern struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig, |
484 | const struct flowi *fl, struct sock *sk, | 490 | const struct flowi *fl, struct sock *sk, |
485 | int flags); | 491 | int flags); |
492 | |||
493 | /* skb attached with this dst needs transformation if dst->xfrm is valid */ | ||
494 | static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst) | ||
495 | { | ||
496 | return dst->xfrm; | ||
497 | } | ||
486 | #endif | 498 | #endif |
487 | 499 | ||
488 | #endif /* _NET_DST_H */ | 500 | #endif /* _NET_DST_H */ |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index f525e7038cca..2b786b7e3585 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -194,11 +194,9 @@ static inline int ip6_skb_dst_mtu(struct sk_buff *skb) | |||
194 | skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); | 194 | skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); |
195 | } | 195 | } |
196 | 196 | ||
197 | static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt, struct in6_addr *dest) | 197 | static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt) |
198 | { | 198 | { |
199 | if (rt->rt6i_flags & RTF_GATEWAY) | 199 | return &rt->rt6i_gateway; |
200 | return &rt->rt6i_gateway; | ||
201 | return dest; | ||
202 | } | 200 | } |
203 | 201 | ||
204 | #endif | 202 | #endif |
diff --git a/include/net/mac802154.h b/include/net/mac802154.h index d0d11df9cba1..807d6b7a943f 100644 --- a/include/net/mac802154.h +++ b/include/net/mac802154.h | |||
@@ -133,7 +133,7 @@ struct ieee802154_ops { | |||
133 | 133 | ||
134 | /* Basic interface to register ieee802154 device */ | 134 | /* Basic interface to register ieee802154 device */ |
135 | struct ieee802154_dev * | 135 | struct ieee802154_dev * |
136 | ieee802154_alloc_device(size_t priv_data_lex, struct ieee802154_ops *ops); | 136 | ieee802154_alloc_device(size_t priv_data_len, struct ieee802154_ops *ops); |
137 | void ieee802154_free_device(struct ieee802154_dev *dev); | 137 | void ieee802154_free_device(struct ieee802154_dev *dev); |
138 | int ieee802154_register_device(struct ieee802154_dev *dev); | 138 | int ieee802154_register_device(struct ieee802154_dev *dev); |
139 | void ieee802154_unregister_device(struct ieee802154_dev *dev); | 139 | void ieee802154_unregister_device(struct ieee802154_dev *dev); |
diff --git a/include/net/sock.h b/include/net/sock.h index 1d37a8086bed..808cbc2ec6c1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1630,16 +1630,14 @@ static inline void sk_filter_release(struct sk_filter *fp) | |||
1630 | 1630 | ||
1631 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) | 1631 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) |
1632 | { | 1632 | { |
1633 | unsigned int size = sk_filter_len(fp); | 1633 | atomic_sub(sk_filter_size(fp->len), &sk->sk_omem_alloc); |
1634 | |||
1635 | atomic_sub(size, &sk->sk_omem_alloc); | ||
1636 | sk_filter_release(fp); | 1634 | sk_filter_release(fp); |
1637 | } | 1635 | } |
1638 | 1636 | ||
1639 | static inline void sk_filter_charge(struct sock *sk, struct sk_filter *fp) | 1637 | static inline void sk_filter_charge(struct sock *sk, struct sk_filter *fp) |
1640 | { | 1638 | { |
1641 | atomic_inc(&fp->refcnt); | 1639 | atomic_inc(&fp->refcnt); |
1642 | atomic_add(sk_filter_len(fp), &sk->sk_omem_alloc); | 1640 | atomic_add(sk_filter_size(fp->len), &sk->sk_omem_alloc); |
1643 | } | 1641 | } |
1644 | 1642 | ||
1645 | /* | 1643 | /* |
diff --git a/include/uapi/linux/tc_act/Kbuild b/include/uapi/linux/tc_act/Kbuild index 0623ec4e728f..56f121605c99 100644 --- a/include/uapi/linux/tc_act/Kbuild +++ b/include/uapi/linux/tc_act/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += tc_csum.h | 2 | header-y += tc_csum.h |
3 | header-y += tc_defact.h | ||
3 | header-y += tc_gact.h | 4 | header-y += tc_gact.h |
4 | header-y += tc_ipt.h | 5 | header-y += tc_ipt.h |
5 | header-y += tc_mirred.h | 6 | header-y += tc_mirred.h |
diff --git a/include/linux/tc_act/tc_defact.h b/include/uapi/linux/tc_act/tc_defact.h index 6f65d07c7ce2..17dddb40f740 100644 --- a/include/linux/tc_act/tc_defact.h +++ b/include/uapi/linux/tc_act/tc_defact.h | |||
@@ -6,7 +6,7 @@ | |||
6 | struct tc_defact { | 6 | struct tc_defact { |
7 | tc_gen; | 7 | tc_gen; |
8 | }; | 8 | }; |
9 | 9 | ||
10 | enum { | 10 | enum { |
11 | TCA_DEF_UNSPEC, | 11 | TCA_DEF_UNSPEC, |
12 | TCA_DEF_TM, | 12 | TCA_DEF_TM, |