diff options
| author | Takashi Iwai <tiwai@suse.de> | 2015-06-22 05:32:41 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2015-06-22 05:32:41 -0400 |
| commit | 57fa8a1e22c5833fb2cae96af68fc39ec21cb017 (patch) | |
| tree | b0bb4e4a6e04a24119da30253add9fe9ffbc8d22 /net/ipv4 | |
| parent | f267f9dff8ba00a8b11f340da3634858ad50ebab (diff) | |
| parent | c99d49a8f81fb35e67b0ffa45f320a75e0b5639d (diff) | |
Merge tag 'asoc-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Further updates for v4.2
There's a bunch of additional updates and fixes that came in since my
orignal pull request here, including DT support for rt5645 and fairly
large serieses of cleanups and improvements to tas2552 and rcar.
Diffstat (limited to 'net/ipv4')
| -rw-r--r-- | net/ipv4/esp4.c | 3 | ||||
| -rw-r--r-- | net/ipv4/ip_vti.c | 14 | ||||
| -rw-r--r-- | net/ipv4/tcp_cong.c | 5 | ||||
| -rw-r--r-- | net/ipv4/tcp_minisocks.c | 5 | ||||
| -rw-r--r-- | net/ipv4/udp.c | 24 |
5 files changed, 37 insertions, 14 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 421a80b09b62..30b544f025ac 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
| @@ -256,7 +256,8 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) | |||
| 256 | aead_givcrypt_set_crypt(req, sg, sg, clen, iv); | 256 | aead_givcrypt_set_crypt(req, sg, sg, clen, iv); |
| 257 | aead_givcrypt_set_assoc(req, asg, assoclen); | 257 | aead_givcrypt_set_assoc(req, asg, assoclen); |
| 258 | aead_givcrypt_set_giv(req, esph->enc_data, | 258 | aead_givcrypt_set_giv(req, esph->enc_data, |
| 259 | XFRM_SKB_CB(skb)->seq.output.low); | 259 | XFRM_SKB_CB(skb)->seq.output.low + |
| 260 | ((u64)XFRM_SKB_CB(skb)->seq.output.hi << 32)); | ||
| 260 | 261 | ||
| 261 | ESP_SKB_CB(skb)->tmp = tmp; | 262 | ESP_SKB_CB(skb)->tmp = tmp; |
| 262 | err = crypto_aead_givencrypt(req); | 263 | err = crypto_aead_givencrypt(req); |
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index 9f7269f3c54a..0c152087ca15 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c | |||
| @@ -65,7 +65,6 @@ static int vti_input(struct sk_buff *skb, int nexthdr, __be32 spi, | |||
| 65 | goto drop; | 65 | goto drop; |
| 66 | 66 | ||
| 67 | XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel; | 67 | XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4 = tunnel; |
| 68 | skb->mark = be32_to_cpu(tunnel->parms.i_key); | ||
| 69 | 68 | ||
| 70 | return xfrm_input(skb, nexthdr, spi, encap_type); | 69 | return xfrm_input(skb, nexthdr, spi, encap_type); |
| 71 | } | 70 | } |
| @@ -91,6 +90,8 @@ static int vti_rcv_cb(struct sk_buff *skb, int err) | |||
| 91 | struct pcpu_sw_netstats *tstats; | 90 | struct pcpu_sw_netstats *tstats; |
| 92 | struct xfrm_state *x; | 91 | struct xfrm_state *x; |
| 93 | struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; | 92 | struct ip_tunnel *tunnel = XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4; |
| 93 | u32 orig_mark = skb->mark; | ||
| 94 | int ret; | ||
| 94 | 95 | ||
| 95 | if (!tunnel) | 96 | if (!tunnel) |
| 96 | return 1; | 97 | return 1; |
| @@ -107,7 +108,11 @@ static int vti_rcv_cb(struct sk_buff *skb, int err) | |||
| 107 | x = xfrm_input_state(skb); | 108 | x = xfrm_input_state(skb); |
| 108 | family = x->inner_mode->afinfo->family; | 109 | family = x->inner_mode->afinfo->family; |
| 109 | 110 | ||
| 110 | if (!xfrm_policy_check(NULL, XFRM_POLICY_IN, skb, family)) | 111 | skb->mark = be32_to_cpu(tunnel->parms.i_key); |
| 112 | ret = xfrm_policy_check(NULL, XFRM_POLICY_IN, skb, family); | ||
| 113 | skb->mark = orig_mark; | ||
| 114 | |||
| 115 | if (!ret) | ||
| 111 | return -EPERM; | 116 | return -EPERM; |
| 112 | 117 | ||
| 113 | skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(skb->dev))); | 118 | skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(skb->dev))); |
| @@ -216,8 +221,6 @@ static netdev_tx_t vti_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 216 | 221 | ||
| 217 | memset(&fl, 0, sizeof(fl)); | 222 | memset(&fl, 0, sizeof(fl)); |
| 218 | 223 | ||
| 219 | skb->mark = be32_to_cpu(tunnel->parms.o_key); | ||
| 220 | |||
| 221 | switch (skb->protocol) { | 224 | switch (skb->protocol) { |
| 222 | case htons(ETH_P_IP): | 225 | case htons(ETH_P_IP): |
| 223 | xfrm_decode_session(skb, &fl, AF_INET); | 226 | xfrm_decode_session(skb, &fl, AF_INET); |
| @@ -233,6 +236,9 @@ static netdev_tx_t vti_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 233 | return NETDEV_TX_OK; | 236 | return NETDEV_TX_OK; |
| 234 | } | 237 | } |
| 235 | 238 | ||
| 239 | /* override mark with tunnel output key */ | ||
| 240 | fl.flowi_mark = be32_to_cpu(tunnel->parms.o_key); | ||
| 241 | |||
| 236 | return vti_xmit(skb, dev, &fl); | 242 | return vti_xmit(skb, dev, &fl); |
| 237 | } | 243 | } |
| 238 | 244 | ||
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 7a5ae50c80c8..84be008c945c 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
| @@ -187,6 +187,7 @@ static void tcp_reinit_congestion_control(struct sock *sk, | |||
| 187 | 187 | ||
| 188 | tcp_cleanup_congestion_control(sk); | 188 | tcp_cleanup_congestion_control(sk); |
| 189 | icsk->icsk_ca_ops = ca; | 189 | icsk->icsk_ca_ops = ca; |
| 190 | icsk->icsk_ca_setsockopt = 1; | ||
| 190 | 191 | ||
| 191 | if (sk->sk_state != TCP_CLOSE && icsk->icsk_ca_ops->init) | 192 | if (sk->sk_state != TCP_CLOSE && icsk->icsk_ca_ops->init) |
| 192 | icsk->icsk_ca_ops->init(sk); | 193 | icsk->icsk_ca_ops->init(sk); |
| @@ -335,8 +336,10 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) | |||
| 335 | rcu_read_lock(); | 336 | rcu_read_lock(); |
| 336 | ca = __tcp_ca_find_autoload(name); | 337 | ca = __tcp_ca_find_autoload(name); |
| 337 | /* No change asking for existing value */ | 338 | /* No change asking for existing value */ |
| 338 | if (ca == icsk->icsk_ca_ops) | 339 | if (ca == icsk->icsk_ca_ops) { |
| 340 | icsk->icsk_ca_setsockopt = 1; | ||
| 339 | goto out; | 341 | goto out; |
| 342 | } | ||
| 340 | if (!ca) | 343 | if (!ca) |
| 341 | err = -ENOENT; | 344 | err = -ENOENT; |
| 342 | else if (!((ca->flags & TCP_CONG_NON_RESTRICTED) || | 345 | else if (!((ca->flags & TCP_CONG_NON_RESTRICTED) || |
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index b5732a54f2ad..17e7339ee5ca 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
| @@ -420,7 +420,10 @@ void tcp_ca_openreq_child(struct sock *sk, const struct dst_entry *dst) | |||
| 420 | rcu_read_unlock(); | 420 | rcu_read_unlock(); |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | if (!ca_got_dst && !try_module_get(icsk->icsk_ca_ops->owner)) | 423 | /* If no valid choice made yet, assign current system default ca. */ |
| 424 | if (!ca_got_dst && | ||
| 425 | (!icsk->icsk_ca_setsockopt || | ||
| 426 | !try_module_get(icsk->icsk_ca_ops->owner))) | ||
| 424 | tcp_assign_congestion_control(sk); | 427 | tcp_assign_congestion_control(sk); |
| 425 | 428 | ||
| 426 | tcp_set_ca_state(sk, TCP_CA_Open); | 429 | tcp_set_ca_state(sk, TCP_CA_Open); |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index d10b7e0112eb..83aa604f9273 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
| @@ -90,6 +90,7 @@ | |||
| 90 | #include <linux/socket.h> | 90 | #include <linux/socket.h> |
| 91 | #include <linux/sockios.h> | 91 | #include <linux/sockios.h> |
| 92 | #include <linux/igmp.h> | 92 | #include <linux/igmp.h> |
| 93 | #include <linux/inetdevice.h> | ||
| 93 | #include <linux/in.h> | 94 | #include <linux/in.h> |
| 94 | #include <linux/errno.h> | 95 | #include <linux/errno.h> |
| 95 | #include <linux/timer.h> | 96 | #include <linux/timer.h> |
| @@ -1345,10 +1346,8 @@ csum_copy_err: | |||
| 1345 | } | 1346 | } |
| 1346 | unlock_sock_fast(sk, slow); | 1347 | unlock_sock_fast(sk, slow); |
| 1347 | 1348 | ||
| 1348 | if (noblock) | 1349 | /* starting over for a new packet, but check if we need to yield */ |
| 1349 | return -EAGAIN; | 1350 | cond_resched(); |
| 1350 | |||
| 1351 | /* starting over for a new packet */ | ||
| 1352 | msg->msg_flags &= ~MSG_TRUNC; | 1351 | msg->msg_flags &= ~MSG_TRUNC; |
| 1353 | goto try_again; | 1352 | goto try_again; |
| 1354 | } | 1353 | } |
| @@ -1962,6 +1961,7 @@ void udp_v4_early_demux(struct sk_buff *skb) | |||
| 1962 | struct sock *sk; | 1961 | struct sock *sk; |
| 1963 | struct dst_entry *dst; | 1962 | struct dst_entry *dst; |
| 1964 | int dif = skb->dev->ifindex; | 1963 | int dif = skb->dev->ifindex; |
| 1964 | int ours; | ||
| 1965 | 1965 | ||
| 1966 | /* validate the packet */ | 1966 | /* validate the packet */ |
| 1967 | if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) | 1967 | if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) |
| @@ -1971,14 +1971,24 @@ void udp_v4_early_demux(struct sk_buff *skb) | |||
| 1971 | uh = udp_hdr(skb); | 1971 | uh = udp_hdr(skb); |
| 1972 | 1972 | ||
| 1973 | if (skb->pkt_type == PACKET_BROADCAST || | 1973 | if (skb->pkt_type == PACKET_BROADCAST || |
| 1974 | skb->pkt_type == PACKET_MULTICAST) | 1974 | skb->pkt_type == PACKET_MULTICAST) { |
| 1975 | struct in_device *in_dev = __in_dev_get_rcu(skb->dev); | ||
| 1976 | |||
| 1977 | if (!in_dev) | ||
| 1978 | return; | ||
| 1979 | |||
| 1980 | ours = ip_check_mc_rcu(in_dev, iph->daddr, iph->saddr, | ||
| 1981 | iph->protocol); | ||
| 1982 | if (!ours) | ||
| 1983 | return; | ||
| 1975 | sk = __udp4_lib_mcast_demux_lookup(net, uh->dest, iph->daddr, | 1984 | sk = __udp4_lib_mcast_demux_lookup(net, uh->dest, iph->daddr, |
| 1976 | uh->source, iph->saddr, dif); | 1985 | uh->source, iph->saddr, dif); |
| 1977 | else if (skb->pkt_type == PACKET_HOST) | 1986 | } else if (skb->pkt_type == PACKET_HOST) { |
| 1978 | sk = __udp4_lib_demux_lookup(net, uh->dest, iph->daddr, | 1987 | sk = __udp4_lib_demux_lookup(net, uh->dest, iph->daddr, |
| 1979 | uh->source, iph->saddr, dif); | 1988 | uh->source, iph->saddr, dif); |
| 1980 | else | 1989 | } else { |
| 1981 | return; | 1990 | return; |
| 1991 | } | ||
| 1982 | 1992 | ||
| 1983 | if (!sk) | 1993 | if (!sk) |
| 1984 | return; | 1994 | return; |
