/linux-4.1.27/net/dccp/ |
D | minisocks.c | 85 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in dccp_create_openreq_child() local 87 if (newsk != NULL) { in dccp_create_openreq_child() 89 struct inet_connection_sock *newicsk = inet_csk(newsk); in dccp_create_openreq_child() 90 struct dccp_sock *newdp = dccp_sk(newsk); in dccp_create_openreq_child() 121 if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) { in dccp_create_openreq_child() 124 newsk->sk_destruct = NULL; in dccp_create_openreq_child() 125 sk_free(newsk); in dccp_create_openreq_child() 128 dccp_init_xmit_timers(newsk); in dccp_create_openreq_child() 132 return newsk; in dccp_create_openreq_child()
|
D | ipv6.c | 426 struct sock *newsk; in dccp_v6_request_recv_sock() local 432 newsk = dccp_v4_request_recv_sock(sk, skb, req, dst); in dccp_v6_request_recv_sock() 433 if (newsk == NULL) in dccp_v6_request_recv_sock() 436 newdp6 = (struct dccp6_sock *)newsk; in dccp_v6_request_recv_sock() 437 newinet = inet_sk(newsk); in dccp_v6_request_recv_sock() 439 newnp = inet6_sk(newsk); in dccp_v6_request_recv_sock() 443 newnp->saddr = newsk->sk_v6_rcv_saddr; in dccp_v6_request_recv_sock() 445 inet_csk(newsk)->icsk_af_ops = &dccp_ipv6_mapped; in dccp_v6_request_recv_sock() 446 newsk->sk_backlog_rcv = dccp_v4_do_rcv; in dccp_v6_request_recv_sock() 462 dccp_sync_mss(newsk, inet_csk(newsk)->icsk_pmtu_cookie); in dccp_v6_request_recv_sock() [all …]
|
D | ipv4.c | 399 struct sock *newsk; in dccp_v4_request_recv_sock() local 404 newsk = dccp_create_openreq_child(sk, req, skb); in dccp_v4_request_recv_sock() 405 if (newsk == NULL) in dccp_v4_request_recv_sock() 408 newinet = inet_sk(newsk); in dccp_v4_request_recv_sock() 410 sk_daddr_set(newsk, ireq->ir_rmt_addr); in dccp_v4_request_recv_sock() 411 sk_rcv_saddr_set(newsk, ireq->ir_loc_addr); in dccp_v4_request_recv_sock() 419 if (dst == NULL && (dst = inet_csk_route_child_sock(sk, newsk, req)) == NULL) in dccp_v4_request_recv_sock() 422 sk_setup_caps(newsk, dst); in dccp_v4_request_recv_sock() 424 dccp_sync_mss(newsk, dst_mtu(dst)); in dccp_v4_request_recv_sock() 426 if (__inet_inherit_port(sk, newsk) < 0) in dccp_v4_request_recv_sock() [all …]
|
/linux-4.1.27/net/core/ |
D | sock.c | 1479 static void sk_update_clone(const struct sock *sk, struct sock *newsk) in sk_update_clone() argument 1482 sock_update_memcg(newsk); in sk_update_clone() 1494 struct sock *newsk; in sk_clone_lock() local 1497 newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family); in sk_clone_lock() 1498 if (newsk != NULL) { in sk_clone_lock() 1501 sock_copy(newsk, sk); in sk_clone_lock() 1504 get_net(sock_net(newsk)); in sk_clone_lock() 1505 sk_node_init(&newsk->sk_node); in sk_clone_lock() 1506 sock_lock_init(newsk); in sk_clone_lock() 1507 bh_lock_sock(newsk); in sk_clone_lock() [all …]
|
D | skbuff.c | 2425 void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk) in skb_queue_head() argument 2430 __skb_queue_head(list, newsk); in skb_queue_head() 2446 void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk) in skb_queue_tail() argument 2451 __skb_queue_tail(list, newsk); in skb_queue_tail() 2486 void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list) in skb_append() argument 2491 __skb_queue_after(list, old, newsk); in skb_append() 2508 void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list) in skb_insert() argument 2513 __skb_insert(newsk, old->prev, old, list); in skb_insert()
|
/linux-4.1.27/net/ipv6/ |
D | tcp_ipv6.c | 1004 struct sock *newsk; in tcp_v6_syn_recv_sock() local 1015 newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst); in tcp_v6_syn_recv_sock() 1017 if (!newsk) in tcp_v6_syn_recv_sock() 1020 newtcp6sk = (struct tcp6_sock *)newsk; in tcp_v6_syn_recv_sock() 1021 inet_sk(newsk)->pinet6 = &newtcp6sk->inet6; in tcp_v6_syn_recv_sock() 1023 newinet = inet_sk(newsk); in tcp_v6_syn_recv_sock() 1024 newnp = inet6_sk(newsk); in tcp_v6_syn_recv_sock() 1025 newtp = tcp_sk(newsk); in tcp_v6_syn_recv_sock() 1029 newnp->saddr = newsk->sk_v6_rcv_saddr; in tcp_v6_syn_recv_sock() 1031 inet_csk(newsk)->icsk_af_ops = &ipv6_mapped; in tcp_v6_syn_recv_sock() [all …]
|
/linux-4.1.27/net/decnet/ |
D | af_decnet.c | 1075 struct sock *sk = sock->sk, *newsk; in dn_accept() local 1102 newsk = dn_alloc_sock(sock_net(sk), newsock, sk->sk_allocation); in dn_accept() 1103 if (newsk == NULL) { in dn_accept() 1111 sk_dst_set(newsk, dst); in dn_accept() 1114 DN_SK(newsk)->state = DN_CR; in dn_accept() 1115 DN_SK(newsk)->addrrem = cb->src_port; in dn_accept() 1116 DN_SK(newsk)->services_rem = cb->services; in dn_accept() 1117 DN_SK(newsk)->info_rem = cb->info; in dn_accept() 1118 DN_SK(newsk)->segsize_rem = cb->segsize; in dn_accept() 1119 DN_SK(newsk)->accept_mode = DN_SK(sk)->accept_mode; in dn_accept() [all …]
|
/linux-4.1.27/net/sctp/ |
D | ipv6.c | 634 struct sock *newsk; in sctp_v6_create_accept_sk() local 639 newsk = sk_alloc(sock_net(sk), PF_INET6, GFP_KERNEL, sk->sk_prot); in sctp_v6_create_accept_sk() 640 if (!newsk) in sctp_v6_create_accept_sk() 643 sock_init_data(NULL, newsk); in sctp_v6_create_accept_sk() 645 sctp_copy_sock(newsk, sk, asoc); in sctp_v6_create_accept_sk() 648 newsctp6sk = (struct sctp6_sock *)newsk; in sctp_v6_create_accept_sk() 649 inet_sk(newsk)->pinet6 = &newsctp6sk->inet6; in sctp_v6_create_accept_sk() 651 sctp_sk(newsk)->v4mapped = sctp_sk(sk)->v4mapped; in sctp_v6_create_accept_sk() 653 newnp = inet6_sk(newsk); in sctp_v6_create_accept_sk() 660 opt = ipv6_dup_options(newsk, opt); in sctp_v6_create_accept_sk() [all …]
|
D | protocol.c | 554 struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL, in sctp_v4_create_accept_sk() local 558 if (!newsk) in sctp_v4_create_accept_sk() 561 sock_init_data(NULL, newsk); in sctp_v4_create_accept_sk() 563 sctp_copy_sock(newsk, sk, asoc); in sctp_v4_create_accept_sk() 564 sock_reset_flag(newsk, SOCK_ZAPPED); in sctp_v4_create_accept_sk() 566 newinet = inet_sk(newsk); in sctp_v4_create_accept_sk() 570 sk_refcnt_debug_inc(newsk); in sctp_v4_create_accept_sk() 572 if (newsk->sk_prot->init(newsk)) { in sctp_v4_create_accept_sk() 573 sk_common_release(newsk); in sctp_v4_create_accept_sk() 574 newsk = NULL; in sctp_v4_create_accept_sk() [all …]
|
D | socket.c | 3909 struct sock *newsk = NULL; in sctp_accept() local 3940 newsk = sp->pf->create_accept_sk(sk, asoc); in sctp_accept() 3941 if (!newsk) { in sctp_accept() 3949 sctp_sock_migrate(sk, newsk, asoc, SCTP_SOCKET_TCP); in sctp_accept() 3954 return newsk; in sctp_accept() 7175 void sctp_copy_sock(struct sock *newsk, struct sock *sk, in sctp_copy_sock() argument 7181 newsk->sk_type = sk->sk_type; in sctp_copy_sock() 7182 newsk->sk_bound_dev_if = sk->sk_bound_dev_if; in sctp_copy_sock() 7183 newsk->sk_flags = sk->sk_flags; in sctp_copy_sock() 7184 newsk->sk_tsflags = sk->sk_tsflags; in sctp_copy_sock() [all …]
|
D | associola.c | 1059 void sctp_assoc_migrate(struct sctp_association *assoc, struct sock *newsk) in sctp_assoc_migrate() argument 1061 struct sctp_sock *newsp = sctp_sk(newsk); in sctp_assoc_migrate() 1082 assoc->base.sk = newsk; in sctp_assoc_migrate()
|
/linux-4.1.27/net/ipv4/ |
D | inet_connection_sock.c | 299 struct sock *newsk; in inet_csk_accept() local 325 newsk = req->sk; in inet_csk_accept() 348 return newsk; in inet_csk_accept() 350 newsk = NULL; in inet_csk_accept() 434 struct sock *newsk, in inet_csk_route_child_sock() argument 439 struct inet_sock *newinet = inet_sk(newsk); in inet_csk_route_child_sock() 709 struct sock *newsk = sk_clone_lock(sk, priority); in inet_csk_clone_lock() local 711 if (newsk) { in inet_csk_clone_lock() 712 struct inet_connection_sock *newicsk = inet_csk(newsk); in inet_csk_clone_lock() 714 newsk->sk_state = TCP_SYN_RECV; in inet_csk_clone_lock() [all …]
|
D | tcp_minisocks.c | 440 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in tcp_create_openreq_child() local 442 if (newsk) { in tcp_create_openreq_child() 445 struct inet_connection_sock *newicsk = inet_csk(newsk); in tcp_create_openreq_child() 446 struct tcp_sock *newtp = tcp_sk(newsk); in tcp_create_openreq_child() 485 tcp_init_xmit_timers(newsk); in tcp_create_openreq_child() 496 if (sock_flag(newsk, SOCK_KEEPOPEN)) in tcp_create_openreq_child() 497 inet_csk_reset_keepalive_timer(newsk, in tcp_create_openreq_child() 531 if (newtp->af_specific->md5_lookup(sk, newsk)) in tcp_create_openreq_child() 543 return newsk; in tcp_create_openreq_child()
|
D | tcp_ipv4.c | 1255 struct sock *newsk; in tcp_v4_syn_recv_sock() local 1264 newsk = tcp_create_openreq_child(sk, req, skb); in tcp_v4_syn_recv_sock() 1265 if (!newsk) in tcp_v4_syn_recv_sock() 1268 newsk->sk_gso_type = SKB_GSO_TCPV4; in tcp_v4_syn_recv_sock() 1269 inet_sk_rx_dst_set(newsk, skb); in tcp_v4_syn_recv_sock() 1271 newtp = tcp_sk(newsk); in tcp_v4_syn_recv_sock() 1272 newinet = inet_sk(newsk); in tcp_v4_syn_recv_sock() 1274 sk_daddr_set(newsk, ireq->ir_rmt_addr); in tcp_v4_syn_recv_sock() 1275 sk_rcv_saddr_set(newsk, ireq->ir_loc_addr); in tcp_v4_syn_recv_sock() 1283 inet_csk(newsk)->icsk_ext_hdr_len = 0; in tcp_v4_syn_recv_sock() [all …]
|
/linux-4.1.27/net/phonet/ |
D | pep.c | 777 struct sock *newsk = NULL; in pep_sock_accept() local 839 newsk = pep_find_pipe(&pn->hlist, &dst, pipe_handle); in pep_sock_accept() 840 if (unlikely(newsk)) { in pep_sock_accept() 841 __sock_put(newsk); in pep_sock_accept() 842 newsk = NULL; in pep_sock_accept() 848 newsk = sk_alloc(sock_net(sk), PF_PHONET, GFP_KERNEL, sk->sk_prot); in pep_sock_accept() 849 if (!newsk) { in pep_sock_accept() 855 sock_init_data(NULL, newsk); in pep_sock_accept() 856 newsk->sk_state = TCP_SYN_RECV; in pep_sock_accept() 857 newsk->sk_backlog_rcv = pipe_do_rcv; in pep_sock_accept() [all …]
|
D | socket.c | 307 struct sock *newsk; in pn_socket_accept() local 313 newsk = sk->sk_prot->accept(sk, flags, &err); in pn_socket_accept() 314 if (!newsk) in pn_socket_accept() 317 lock_sock(newsk); in pn_socket_accept() 318 sock_graft(newsk, newsock); in pn_socket_accept() 320 release_sock(newsk); in pn_socket_accept()
|
/linux-4.1.27/net/llc/ |
D | llc_conn.c | 770 struct sock *newsk = llc_sk_alloc(sock_net(sk), sk->sk_family, GFP_ATOMIC, in llc_create_incoming_sock() local 774 if (!newsk) in llc_create_incoming_sock() 776 newllc = llc_sk(newsk); in llc_create_incoming_sock() 781 llc_sap_add_socket(llc->sap, newsk); in llc_create_incoming_sock() 784 return newsk; in llc_create_incoming_sock() 811 struct sock *newsk = llc_create_incoming_sock(sk, skb->dev, in llc_conn_handler() local 813 if (!newsk) in llc_conn_handler() 815 skb_set_owner_r(skb, newsk); in llc_conn_handler()
|
D | af_llc.c | 647 struct sock *sk = sock->sk, *newsk; in llc_ui_accept() local 674 newsk = skb->sk; in llc_ui_accept() 676 llc_ui_sk_init(newsock, newsk); in llc_ui_accept() 677 sock_reset_flag(newsk, SOCK_ZAPPED); in llc_ui_accept() 678 newsk->sk_state = TCP_ESTABLISHED; in llc_ui_accept() 681 newllc = llc_sk(newsk); in llc_ui_accept()
|
/linux-4.1.27/include/linux/ |
D | skbuff.h | 1353 void skb_insert(struct sk_buff *old, struct sk_buff *newsk, 1355 static inline void __skb_insert(struct sk_buff *newsk, in __skb_insert() argument 1359 newsk->next = next; in __skb_insert() 1360 newsk->prev = prev; in __skb_insert() 1361 next->prev = prev->next = newsk; in __skb_insert() 1455 struct sk_buff *newsk) in __skb_queue_after() argument 1457 __skb_insert(newsk, prev, prev->next, list); in __skb_queue_after() 1460 void skb_append(struct sk_buff *old, struct sk_buff *newsk, 1465 struct sk_buff *newsk) in __skb_queue_before() argument 1467 __skb_insert(newsk, next->prev, next, list); in __skb_queue_before() [all …]
|
D | security.h | 1676 int (*unix_stream_connect) (struct sock *sock, struct sock *other, struct sock *newsk); 1702 void (*sk_clone_security) (const struct sock *sk, struct sock *newsk); 1707 void (*inet_csk_clone) (struct sock *newsk, const struct request_sock *req); 2693 int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk); 2716 void security_sk_clone(const struct sock *sk, struct sock *newsk); 2722 void security_inet_csk_clone(struct sock *newsk, 2739 struct sock *newsk) in security_unix_stream_connect() argument 2854 static inline void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 2876 static inline void security_inet_csk_clone(struct sock *newsk, in security_inet_csk_clone() argument
|
/linux-4.1.27/net/unix/ |
D | af_unix.c | 1181 struct sock *newsk = NULL; in unix_stream_connect() local 1208 newsk = unix_create1(sock_net(sk), NULL); in unix_stream_connect() 1209 if (newsk == NULL) in unix_stream_connect() 1213 skb = sock_wmalloc(newsk, 1, 0, GFP_KERNEL); in unix_stream_connect() 1288 err = security_unix_stream_connect(sk, other, newsk); in unix_stream_connect() 1297 unix_peer(newsk) = sk; in unix_stream_connect() 1298 newsk->sk_state = TCP_ESTABLISHED; in unix_stream_connect() 1299 newsk->sk_type = sk->sk_type; in unix_stream_connect() 1300 init_peercred(newsk); in unix_stream_connect() 1301 newu = unix_sk(newsk); in unix_stream_connect() [all …]
|
/linux-4.1.27/security/ |
D | security.c | 1157 int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk) in security_unix_stream_connect() argument 1159 return security_ops->unix_stream_connect(sock, other, newsk); in security_unix_stream_connect() 1265 void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 1267 security_ops->sk_clone_security(sk, newsk); in security_sk_clone() 1296 void security_inet_csk_clone(struct sock *newsk, in security_inet_csk_clone() argument 1299 security_ops->inet_csk_clone(newsk, req); in security_inet_csk_clone()
|
D | capability.c | 600 struct sock *newsk) in cap_unix_stream_connect() argument 706 static void cap_sk_clone_security(const struct sock *sk, struct sock *newsk) in cap_sk_clone_security() argument 724 static void cap_inet_csk_clone(struct sock *newsk, in cap_inet_csk_clone() argument
|
/linux-4.1.27/include/net/sctp/ |
D | sctp.h | 108 void sctp_copy_sock(struct sock *newsk, struct sock *sk, 145 struct sock *oldsk, struct sock *newsk);
|
/linux-4.1.27/net/irda/ |
D | af_irda.c | 834 struct sock *newsk; in irda_accept() local 889 newsk = newsock->sk; in irda_accept() 891 if (newsk == NULL) in irda_accept() 894 newsk->sk_state = TCP_ESTABLISHED; in irda_accept() 896 new = irda_sk(newsk); in irda_accept()
|
/linux-4.1.27/include/net/ |
D | inet_connection_sock.h | 271 struct dst_entry *inet_csk_route_child_sock(struct sock *sk, struct sock *newsk,
|
/linux-4.1.27/net/netrom/ |
D | af_netrom.c | 771 struct sock *newsk; in nr_accept() local 817 newsk = skb->sk; in nr_accept() 818 sock_graft(newsk, newsock); in nr_accept()
|
/linux-4.1.27/net/rose/ |
D | af_rose.c | 876 struct sock *newsk; in rose_accept() local 923 newsk = skb->sk; in rose_accept() 924 sock_graft(newsk, newsock); in rose_accept()
|
/linux-4.1.27/net/x25/ |
D | af_x25.c | 858 struct sock *newsk; in x25_accept() local 881 newsk = skb->sk; in x25_accept() 882 sock_graft(newsk, newsock); in x25_accept()
|
/linux-4.1.27/net/ax25/ |
D | af_ax25.c | 1326 struct sock *newsk; in ax25_accept() local 1376 newsk = skb->sk; in ax25_accept() 1377 sock_graft(newsk, newsock); in ax25_accept()
|
/linux-4.1.27/drivers/net/usb/ |
D | usbnet.c | 406 struct sk_buff *newsk, enum skb_state state) in __usbnet_queue_skb() argument 408 struct skb_data *entry = (struct skb_data *) newsk->cb; in __usbnet_queue_skb() 410 __skb_queue_tail(list, newsk); in __usbnet_queue_skb()
|
/linux-4.1.27/security/selinux/ |
D | hooks.c | 4308 struct sock *newsk) in selinux_socket_unix_stream_connect() argument 4312 struct sk_security_struct *sksec_new = newsk->sk_security; in selinux_socket_unix_stream_connect() 4566 static void selinux_sk_clone_security(const struct sock *sk, struct sock *newsk) in selinux_sk_clone_security() argument 4569 struct sk_security_struct *newsksec = newsk->sk_security; in selinux_sk_clone_security() 4621 static void selinux_inet_csk_clone(struct sock *newsk, in selinux_inet_csk_clone() argument 4624 struct sk_security_struct *newsksec = newsk->sk_security; in selinux_inet_csk_clone() 4635 selinux_netlbl_inet_csk_clone(newsk, req->rsk_ops->family); in selinux_inet_csk_clone()
|
/linux-4.1.27/security/smack/ |
D | smack_lsm.c | 3360 struct sock *other, struct sock *newsk) in smack_unix_stream_connect() argument 3366 struct socket_smack *nsp = newsk->sk_security; in smack_unix_stream_connect()
|