Merge remote-tracking branch 'torvalds/master' into perf/core
[linux-2.6-microblaze.git] / net / ipv6 / udp.c
index d25e5a9..3fcd86f 100644 (file)
@@ -749,6 +749,7 @@ static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
        skb_list_walk_safe(segs, skb, next) {
                __skb_pull(skb, skb_transport_offset(skb));
 
+               udp_post_segment_fix_csum(skb);
                ret = udpv6_queue_rcv_one_skb(sk, skb);
                if (ret > 0)
                        ip6_protocol_deliver_rcu(dev_net(skb->dev), skb, ret,
@@ -1597,6 +1598,9 @@ void udpv6_destroy_sock(struct sock *sk)
 {
        struct udp_sock *up = udp_sk(sk);
        lock_sock(sk);
+
+       /* protects from races with udp_abort() */
+       sock_set_flag(sk, SOCK_DEAD);
        udp_v6_flush_pending_frames(sk);
        release_sock(sk);
 
@@ -1713,6 +1717,9 @@ struct proto udpv6_prot = {
        .unhash                 = udp_lib_unhash,
        .rehash                 = udp_v6_rehash,
        .get_port               = udp_v6_get_port,
+#ifdef CONFIG_BPF_SYSCALL
+       .psock_update_sk_prot   = udp_bpf_update_proto,
+#endif
        .memory_allocated       = &udp_memory_allocated,
        .sysctl_mem             = sysctl_udp_mem,
        .sysctl_wmem_offset     = offsetof(struct net, ipv4.sysctl_udp_wmem_min),