include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / sctp / socket.c
index 67fdac9d2d3382e566c2f91d26d13d2bde4a5689..007e8baba0891c1c5b52e6e8bc2fadcc6edd96e5 100644 (file)
@@ -67,6 +67,7 @@
 #include <linux/poll.h>
 #include <linux/init.h>
 #include <linux/crypto.h>
+#include <linux/slab.h>
 
 #include <net/ip.h>
 #include <net/icmp.h>
@@ -3720,6 +3721,9 @@ SCTP_STATIC int sctp_init_sock(struct sock *sk)
        SCTP_DBG_OBJCNT_INC(sock);
        percpu_counter_inc(&sctp_sockets_allocated);
 
+       /* Set socket backlog limit. */
+       sk->sk_backlog.limit = sysctl_sctp_rmem[1];
+
        local_bh_disable();
        sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
        local_bh_enable();
@@ -6359,7 +6363,7 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk,
                    struct sctp_association *asoc)
 {
        struct inet_sock *inet = inet_sk(sk);
-       struct inet_sock *newinet = inet_sk(newsk);
+       struct inet_sock *newinet;
 
        newsk->sk_type = sk->sk_type;
        newsk->sk_bound_dev_if = sk->sk_bound_dev_if;