aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/appletalk/ddp.c2
-rw-r--r--net/atm/common.c2
-rw-r--r--net/ax25/af_ax25.c6
-rw-r--r--net/bluetooth/bnep/sock.c2
-rw-r--r--net/bluetooth/cmtp/sock.c2
-rw-r--r--net/bluetooth/hci_sock.c2
-rw-r--r--net/bluetooth/hidp/sock.c2
-rw-r--r--net/bluetooth/l2cap.c2
-rw-r--r--net/bluetooth/rfcomm/sock.c2
-rw-r--r--net/bluetooth/sco.c2
-rw-r--r--net/core/sock.c2
-rw-r--r--net/decnet/af_decnet.c2
-rw-r--r--net/econet/af_econet.c2
-rw-r--r--net/ipv4/af_inet.c2
-rw-r--r--net/ipv6/af_inet6.c2
-rw-r--r--net/ipx/af_ipx.c2
-rw-r--r--net/irda/af_irda.c2
-rw-r--r--net/iucv/af_iucv.c2
-rw-r--r--net/key/af_key.c2
-rw-r--r--net/llc/llc_conn.c2
-rw-r--r--net/netlink/af_netlink.c2
-rw-r--r--net/netrom/af_netrom.c6
-rw-r--r--net/packet/af_packet.c2
-rw-r--r--net/rose/af_rose.c6
-rw-r--r--net/rxrpc/af_rxrpc.c2
-rw-r--r--net/sctp/ipv6.c2
-rw-r--r--net/sctp/protocol.c3
-rw-r--r--net/tipc/socket.c2
-rw-r--r--net/unix/af_unix.c2
-rw-r--r--net/x25/af_x25.c2
30 files changed, 40 insertions, 33 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 7c0b5151d526..e0d37d6dc1f8 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1044,7 +1044,7 @@ static int atalk_create(struct net *net, struct socket *sock, int protocol)
1044 if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM) 1044 if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM)
1045 goto out; 1045 goto out;
1046 rc = -ENOMEM; 1046 rc = -ENOMEM;
1047 sk = sk_alloc(net, PF_APPLETALK, GFP_KERNEL, &ddp_proto, 1); 1047 sk = sk_alloc(net, PF_APPLETALK, GFP_KERNEL, &ddp_proto);
1048 if (!sk) 1048 if (!sk)
1049 goto out; 1049 goto out;
1050 rc = 0; 1050 rc = 0;
diff --git a/net/atm/common.c b/net/atm/common.c
index e166d9e0ffd9..eba09a04f6bf 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -133,7 +133,7 @@ int vcc_create(struct net *net, struct socket *sock, int protocol, int family)
133 sock->sk = NULL; 133 sock->sk = NULL;
134 if (sock->type == SOCK_STREAM) 134 if (sock->type == SOCK_STREAM)
135 return -EINVAL; 135 return -EINVAL;
136 sk = sk_alloc(net, family, GFP_KERNEL, &vcc_proto, 1); 136 sk = sk_alloc(net, family, GFP_KERNEL, &vcc_proto);
137 if (!sk) 137 if (!sk)
138 return -ENOMEM; 138 return -ENOMEM;
139 sock_init_data(sock, sk); 139 sock_init_data(sock, sk);
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 993e5c75e909..8378afd54b30 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -836,7 +836,8 @@ static int ax25_create(struct net *net, struct socket *sock, int protocol)
836 return -ESOCKTNOSUPPORT; 836 return -ESOCKTNOSUPPORT;
837 } 837 }
838 838
839 if ((sk = sk_alloc(net, PF_AX25, GFP_ATOMIC, &ax25_proto, 1)) == NULL) 839 sk = sk_alloc(net, PF_AX25, GFP_ATOMIC, &ax25_proto);
840 if (sk == NULL)
840 return -ENOMEM; 841 return -ENOMEM;
841 842
842 ax25 = sk->sk_protinfo = ax25_create_cb(); 843 ax25 = sk->sk_protinfo = ax25_create_cb();
@@ -861,7 +862,8 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev)
861 struct sock *sk; 862 struct sock *sk;
862 ax25_cb *ax25, *oax25; 863 ax25_cb *ax25, *oax25;
863 864
864 if ((sk = sk_alloc(osk->sk_net, PF_AX25, GFP_ATOMIC, osk->sk_prot, 1)) == NULL) 865 sk = sk_alloc(osk->sk_net, PF_AX25, GFP_ATOMIC, osk->sk_prot);
866 if (sk == NULL)
865 return NULL; 867 return NULL;
866 868
867 if ((ax25 = ax25_create_cb()) == NULL) { 869 if ((ax25 = ax25_create_cb()) == NULL) {
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
index f718965f296c..9ebd3c64474d 100644
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
@@ -213,7 +213,7 @@ static int bnep_sock_create(struct net *net, struct socket *sock, int protocol)
213 if (sock->type != SOCK_RAW) 213 if (sock->type != SOCK_RAW)
214 return -ESOCKTNOSUPPORT; 214 return -ESOCKTNOSUPPORT;
215 215
216 sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &bnep_proto, 1); 216 sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &bnep_proto);
217 if (!sk) 217 if (!sk)
218 return -ENOMEM; 218 return -ENOMEM;
219 219
diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c
index cf700c20d11e..783edab12ce8 100644
--- a/net/bluetooth/cmtp/sock.c
+++ b/net/bluetooth/cmtp/sock.c
@@ -204,7 +204,7 @@ static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol)
204 if (sock->type != SOCK_RAW) 204 if (sock->type != SOCK_RAW)
205 return -ESOCKTNOSUPPORT; 205 return -ESOCKTNOSUPPORT;
206 206
207 sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &cmtp_proto, 1); 207 sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &cmtp_proto);
208 if (!sk) 208 if (!sk)
209 return -ENOMEM; 209 return -ENOMEM;
210 210
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 8825102c517c..14991323c273 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -645,7 +645,7 @@ static int hci_sock_create(struct net *net, struct socket *sock, int protocol)
645 645
646 sock->ops = &hci_sock_ops; 646 sock->ops = &hci_sock_ops;
647 647
648 sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hci_sk_proto, 1); 648 sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hci_sk_proto);
649 if (!sk) 649 if (!sk)
650 return -ENOMEM; 650 return -ENOMEM;
651 651
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c
index 1de2b6fbcac0..3292b956a7c4 100644
--- a/net/bluetooth/hidp/sock.c
+++ b/net/bluetooth/hidp/sock.c
@@ -255,7 +255,7 @@ static int hidp_sock_create(struct net *net, struct socket *sock, int protocol)
255 if (sock->type != SOCK_RAW) 255 if (sock->type != SOCK_RAW)
256 return -ESOCKTNOSUPPORT; 256 return -ESOCKTNOSUPPORT;
257 257
258 sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hidp_proto, 1); 258 sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hidp_proto);
259 if (!sk) 259 if (!sk)
260 return -ENOMEM; 260 return -ENOMEM;
261 261
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 6fbbae78b304..477e052b17b5 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -607,7 +607,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, int p
607{ 607{
608 struct sock *sk; 608 struct sock *sk;
609 609
610 sk = sk_alloc(net, PF_BLUETOOTH, prio, &l2cap_proto, 1); 610 sk = sk_alloc(net, PF_BLUETOOTH, prio, &l2cap_proto);
611 if (!sk) 611 if (!sk)
612 return NULL; 612 return NULL;
613 613
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 266b6972667d..c46d51035e77 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -287,7 +287,7 @@ static struct sock *rfcomm_sock_alloc(struct net *net, struct socket *sock, int
287 struct rfcomm_dlc *d; 287 struct rfcomm_dlc *d;
288 struct sock *sk; 288 struct sock *sk;
289 289
290 sk = sk_alloc(net, PF_BLUETOOTH, prio, &rfcomm_proto, 1); 290 sk = sk_alloc(net, PF_BLUETOOTH, prio, &rfcomm_proto);
291 if (!sk) 291 if (!sk)
292 return NULL; 292 return NULL;
293 293
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 82d0dfdfa7e2..93ad1aae3f38 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -421,7 +421,7 @@ static struct sock *sco_sock_alloc(struct net *net, struct socket *sock, int pro
421{ 421{
422 struct sock *sk; 422 struct sock *sk;
423 423
424 sk = sk_alloc(net, PF_BLUETOOTH, prio, &sco_proto, 1); 424 sk = sk_alloc(net, PF_BLUETOOTH, prio, &sco_proto);
425 if (!sk) 425 if (!sk)
426 return NULL; 426 return NULL;
427 427
diff --git a/net/core/sock.c b/net/core/sock.c
index 6046fc69428b..12ad2067a988 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -927,7 +927,7 @@ static void sk_prot_free(struct proto *prot, struct sock *sk)
927 * @zero_it: if we should zero the newly allocated sock 927 * @zero_it: if we should zero the newly allocated sock
928 */ 928 */
929struct sock *sk_alloc(struct net *net, int family, gfp_t priority, 929struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
930 struct proto *prot, int zero_it) 930 struct proto *prot)
931{ 931{
932 struct sock *sk; 932 struct sock *sk;
933 933
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index aabe98d9402f..57d574951838 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -474,7 +474,7 @@ static struct proto dn_proto = {
474static struct sock *dn_alloc_sock(struct net *net, struct socket *sock, gfp_t gfp) 474static struct sock *dn_alloc_sock(struct net *net, struct socket *sock, gfp_t gfp)
475{ 475{
476 struct dn_scp *scp; 476 struct dn_scp *scp;
477 struct sock *sk = sk_alloc(net, PF_DECnet, gfp, &dn_proto, 1); 477 struct sock *sk = sk_alloc(net, PF_DECnet, gfp, &dn_proto);
478 478
479 if (!sk) 479 if (!sk)
480 goto out; 480 goto out;
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 9cae16b4e0b7..f70df073c588 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -624,7 +624,7 @@ static int econet_create(struct net *net, struct socket *sock, int protocol)
624 sock->state = SS_UNCONNECTED; 624 sock->state = SS_UNCONNECTED;
625 625
626 err = -ENOBUFS; 626 err = -ENOBUFS;
627 sk = sk_alloc(net, PF_ECONET, GFP_KERNEL, &econet_proto, 1); 627 sk = sk_alloc(net, PF_ECONET, GFP_KERNEL, &econet_proto);
628 if (sk == NULL) 628 if (sk == NULL)
629 goto out; 629 goto out;
630 630
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 621b128897d7..d2f22e74b267 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -323,7 +323,7 @@ lookup_protocol:
323 BUG_TRAP(answer_prot->slab != NULL); 323 BUG_TRAP(answer_prot->slab != NULL);
324 324
325 err = -ENOBUFS; 325 err = -ENOBUFS;
326 sk = sk_alloc(net, PF_INET, GFP_KERNEL, answer_prot, 1); 326 sk = sk_alloc(net, PF_INET, GFP_KERNEL, answer_prot);
327 if (sk == NULL) 327 if (sk == NULL)
328 goto out; 328 goto out;
329 329
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 1b1caf3aa1c1..ecbd38894fdd 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -162,7 +162,7 @@ lookup_protocol:
162 BUG_TRAP(answer_prot->slab != NULL); 162 BUG_TRAP(answer_prot->slab != NULL);
163 163
164 err = -ENOBUFS; 164 err = -ENOBUFS;
165 sk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot, 1); 165 sk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot);
166 if (sk == NULL) 166 if (sk == NULL)
167 goto out; 167 goto out;
168 168
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 29b063d43120..a195a66e0cc7 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1381,7 +1381,7 @@ static int ipx_create(struct net *net, struct socket *sock, int protocol)
1381 goto out; 1381 goto out;
1382 1382
1383 rc = -ENOMEM; 1383 rc = -ENOMEM;
1384 sk = sk_alloc(net, PF_IPX, GFP_KERNEL, &ipx_proto, 1); 1384 sk = sk_alloc(net, PF_IPX, GFP_KERNEL, &ipx_proto);
1385 if (!sk) 1385 if (!sk)
1386 goto out; 1386 goto out;
1387#ifdef IPX_REFCNT_DEBUG 1387#ifdef IPX_REFCNT_DEBUG
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 0328ae2654f4..48ce59a6e026 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1078,7 +1078,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
1078 } 1078 }
1079 1079
1080 /* Allocate networking socket */ 1080 /* Allocate networking socket */
1081 sk = sk_alloc(net, PF_IRDA, GFP_ATOMIC, &irda_proto, 1); 1081 sk = sk_alloc(net, PF_IRDA, GFP_ATOMIC, &irda_proto);
1082 if (sk == NULL) 1082 if (sk == NULL)
1083 return -ENOMEM; 1083 return -ENOMEM;
1084 1084
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 43e01c8d382b..aef664580355 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -216,7 +216,7 @@ static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio)
216{ 216{
217 struct sock *sk; 217 struct sock *sk;
218 218
219 sk = sk_alloc(&init_net, PF_IUCV, prio, &iucv_proto, 1); 219 sk = sk_alloc(&init_net, PF_IUCV, prio, &iucv_proto);
220 if (!sk) 220 if (!sk)
221 return NULL; 221 return NULL;
222 222
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 266f112c38c2..10c89d47f685 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -152,7 +152,7 @@ static int pfkey_create(struct net *net, struct socket *sock, int protocol)
152 return -EPROTONOSUPPORT; 152 return -EPROTONOSUPPORT;
153 153
154 err = -ENOMEM; 154 err = -ENOMEM;
155 sk = sk_alloc(net, PF_KEY, GFP_KERNEL, &key_proto, 1); 155 sk = sk_alloc(net, PF_KEY, GFP_KERNEL, &key_proto);
156 if (sk == NULL) 156 if (sk == NULL)
157 goto out; 157 goto out;
158 158
diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c
index 8ebc2769dfda..5c0b484237c8 100644
--- a/net/llc/llc_conn.c
+++ b/net/llc/llc_conn.c
@@ -869,7 +869,7 @@ static void llc_sk_init(struct sock* sk)
869 */ 869 */
870struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot) 870struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot)
871{ 871{
872 struct sock *sk = sk_alloc(net, family, priority, prot, 1); 872 struct sock *sk = sk_alloc(net, family, priority, prot);
873 873
874 if (!sk) 874 if (!sk)
875 goto out; 875 goto out;
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 4f994c0fb3f8..260171255576 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -396,7 +396,7 @@ static int __netlink_create(struct net *net, struct socket *sock,
396 396
397 sock->ops = &netlink_ops; 397 sock->ops = &netlink_ops;
398 398
399 sk = sk_alloc(net, PF_NETLINK, GFP_KERNEL, &netlink_proto, 1); 399 sk = sk_alloc(net, PF_NETLINK, GFP_KERNEL, &netlink_proto);
400 if (!sk) 400 if (!sk)
401 return -ENOMEM; 401 return -ENOMEM;
402 402
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 3a4d479ea64e..972250c974f1 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -423,7 +423,8 @@ static int nr_create(struct net *net, struct socket *sock, int protocol)
423 if (sock->type != SOCK_SEQPACKET || protocol != 0) 423 if (sock->type != SOCK_SEQPACKET || protocol != 0)
424 return -ESOCKTNOSUPPORT; 424 return -ESOCKTNOSUPPORT;
425 425
426 if ((sk = sk_alloc(net, PF_NETROM, GFP_ATOMIC, &nr_proto, 1)) == NULL) 426 sk = sk_alloc(net, PF_NETROM, GFP_ATOMIC, &nr_proto);
427 if (sk == NULL)
427 return -ENOMEM; 428 return -ENOMEM;
428 429
429 nr = nr_sk(sk); 430 nr = nr_sk(sk);
@@ -465,7 +466,8 @@ static struct sock *nr_make_new(struct sock *osk)
465 if (osk->sk_type != SOCK_SEQPACKET) 466 if (osk->sk_type != SOCK_SEQPACKET)
466 return NULL; 467 return NULL;
467 468
468 if ((sk = sk_alloc(osk->sk_net, PF_NETROM, GFP_ATOMIC, osk->sk_prot, 1)) == NULL) 469 sk = sk_alloc(osk->sk_net, PF_NETROM, GFP_ATOMIC, osk->sk_prot);
470 if (sk == NULL)
469 return NULL; 471 return NULL;
470 472
471 nr = nr_sk(sk); 473 nr = nr_sk(sk);
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index d0936506b731..4cb2dfba0993 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -995,7 +995,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol)
995 sock->state = SS_UNCONNECTED; 995 sock->state = SS_UNCONNECTED;
996 996
997 err = -ENOBUFS; 997 err = -ENOBUFS;
998 sk = sk_alloc(net, PF_PACKET, GFP_KERNEL, &packet_proto, 1); 998 sk = sk_alloc(net, PF_PACKET, GFP_KERNEL, &packet_proto);
999 if (sk == NULL) 999 if (sk == NULL)
1000 goto out; 1000 goto out;
1001 1001
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 509defe53ee5..ed2d65cd8010 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -513,7 +513,8 @@ static int rose_create(struct net *net, struct socket *sock, int protocol)
513 if (sock->type != SOCK_SEQPACKET || protocol != 0) 513 if (sock->type != SOCK_SEQPACKET || protocol != 0)
514 return -ESOCKTNOSUPPORT; 514 return -ESOCKTNOSUPPORT;
515 515
516 if ((sk = sk_alloc(net, PF_ROSE, GFP_ATOMIC, &rose_proto, 1)) == NULL) 516 sk = sk_alloc(net, PF_ROSE, GFP_ATOMIC, &rose_proto);
517 if (sk == NULL)
517 return -ENOMEM; 518 return -ENOMEM;
518 519
519 rose = rose_sk(sk); 520 rose = rose_sk(sk);
@@ -551,7 +552,8 @@ static struct sock *rose_make_new(struct sock *osk)
551 if (osk->sk_type != SOCK_SEQPACKET) 552 if (osk->sk_type != SOCK_SEQPACKET)
552 return NULL; 553 return NULL;
553 554
554 if ((sk = sk_alloc(osk->sk_net, PF_ROSE, GFP_ATOMIC, &rose_proto, 1)) == NULL) 555 sk = sk_alloc(osk->sk_net, PF_ROSE, GFP_ATOMIC, &rose_proto);
556 if (sk == NULL)
555 return NULL; 557 return NULL;
556 558
557 rose = rose_sk(sk); 559 rose = rose_sk(sk);
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index c680017f5c8e..d6389450c4bf 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -627,7 +627,7 @@ static int rxrpc_create(struct net *net, struct socket *sock, int protocol)
627 sock->ops = &rxrpc_rpc_ops; 627 sock->ops = &rxrpc_rpc_ops;
628 sock->state = SS_UNCONNECTED; 628 sock->state = SS_UNCONNECTED;
629 629
630 sk = sk_alloc(net, PF_RXRPC, GFP_KERNEL, &rxrpc_proto, 1); 630 sk = sk_alloc(net, PF_RXRPC, GFP_KERNEL, &rxrpc_proto);
631 if (!sk) 631 if (!sk)
632 return -ENOMEM; 632 return -ENOMEM;
633 633
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index eb4deaf58914..7f31ff638bc6 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -631,7 +631,7 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk,
631 struct ipv6_pinfo *newnp, *np = inet6_sk(sk); 631 struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
632 struct sctp6_sock *newsctp6sk; 632 struct sctp6_sock *newsctp6sk;
633 633
634 newsk = sk_alloc(sk->sk_net, PF_INET6, GFP_KERNEL, sk->sk_prot, 1); 634 newsk = sk_alloc(sk->sk_net, PF_INET6, GFP_KERNEL, sk->sk_prot);
635 if (!newsk) 635 if (!newsk)
636 goto out; 636 goto out;
637 637
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index f5cd96f5fe74..40c1a47d1b8d 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -552,7 +552,8 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
552{ 552{
553 struct inet_sock *inet = inet_sk(sk); 553 struct inet_sock *inet = inet_sk(sk);
554 struct inet_sock *newinet; 554 struct inet_sock *newinet;
555 struct sock *newsk = sk_alloc(sk->sk_net, PF_INET, GFP_KERNEL, sk->sk_prot, 1); 555 struct sock *newsk = sk_alloc(sk->sk_net, PF_INET, GFP_KERNEL,
556 sk->sk_prot);
556 557
557 if (!newsk) 558 if (!newsk)
558 goto out; 559 goto out;
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index e36b4b5a5222..6b792265dc06 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -201,7 +201,7 @@ static int tipc_create(struct net *net, struct socket *sock, int protocol)
201 return -EPROTOTYPE; 201 return -EPROTOTYPE;
202 } 202 }
203 203
204 sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto, 1); 204 sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto);
205 if (!sk) { 205 if (!sk) {
206 tipc_deleteport(ref); 206 tipc_deleteport(ref);
207 return -ENOMEM; 207 return -ENOMEM;
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 9163ec526c2a..515e7a692f9b 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -602,7 +602,7 @@ static struct sock * unix_create1(struct net *net, struct socket *sock)
602 if (atomic_read(&unix_nr_socks) >= 2*get_max_files()) 602 if (atomic_read(&unix_nr_socks) >= 2*get_max_files())
603 goto out; 603 goto out;
604 604
605 sk = sk_alloc(net, PF_UNIX, GFP_KERNEL, &unix_proto, 1); 605 sk = sk_alloc(net, PF_UNIX, GFP_KERNEL, &unix_proto);
606 if (!sk) 606 if (!sk)
607 goto out; 607 goto out;
608 608
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index fc416f9606a9..92cfe8e3e0b8 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -472,7 +472,7 @@ static struct proto x25_proto = {
472static struct sock *x25_alloc_socket(struct net *net) 472static struct sock *x25_alloc_socket(struct net *net)
473{ 473{
474 struct x25_sock *x25; 474 struct x25_sock *x25;
475 struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto, 1); 475 struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto);
476 476
477 if (!sk) 477 if (!sk)
478 goto out; 478 goto out;