net: fix saving TX flow hash in sock for outgoing connections
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / tcp.c
index 461003d258ba4030b1a8aa1c49930b7a1ac94b9c..1bec4e76d88c5852d8ba3392b22aa58d6453ab4d 100644 (file)
@@ -2941,7 +2941,7 @@ struct tcp_md5sig_pool *tcp_get_md5sig_pool(void)
        local_bh_disable();
        p = ACCESS_ONCE(tcp_md5sig_pool);
        if (p)
-               return __this_cpu_ptr(p);
+               return raw_cpu_ptr(p);
 
        local_bh_enable();
        return NULL;
@@ -3071,8 +3071,8 @@ void __init tcp_init(void)
 
        BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb));
 
-       percpu_counter_init(&tcp_sockets_allocated, 0);
-       percpu_counter_init(&tcp_orphan_count, 0);
+       percpu_counter_init(&tcp_sockets_allocated, 0, GFP_KERNEL);
+       percpu_counter_init(&tcp_orphan_count, 0, GFP_KERNEL);
        tcp_hashinfo.bind_bucket_cachep =
                kmem_cache_create("tcp_bind_bucket",
                                  sizeof(struct inet_bind_bucket), 0,