/openbmc/linux/net/dccp/ |
H A D | ipv6.c | 428 struct sock *newsk; in dccp_v6_request_recv_sock() local 436 if (newsk == NULL) in dccp_v6_request_recv_sock() 440 newinet = inet_sk(newsk); in dccp_v6_request_recv_sock() 442 newnp = inet6_sk(newsk); in dccp_v6_request_recv_sock() 468 dccp_sync_mss(newsk, inet_csk(newsk)->icsk_pmtu_cookie); in dccp_v6_request_recv_sock() 470 return newsk; in dccp_v6_request_recv_sock() 486 if (newsk == NULL) in dccp_v6_request_recv_sock() 499 newinet = inet_sk(newsk); in dccp_v6_request_recv_sock() 501 newnp = inet6_sk(newsk); in dccp_v6_request_recv_sock() 552 dccp_done(newsk); in dccp_v6_request_recv_sock() [all …]
|
H A D | minisocks.c | 88 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in dccp_create_openreq_child() local 90 if (newsk != NULL) { in dccp_create_openreq_child() 92 struct inet_connection_sock *newicsk = inet_csk(newsk); in dccp_create_openreq_child() 93 struct dccp_sock *newdp = dccp_sk(newsk); in dccp_create_openreq_child() 126 if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) { in dccp_create_openreq_child() 127 sk_free_unlock_clone(newsk); in dccp_create_openreq_child() 130 dccp_init_xmit_timers(newsk); in dccp_create_openreq_child() 134 return newsk; in dccp_create_openreq_child()
|
H A D | ipv4.c | 416 struct sock *newsk; in dccp_v4_request_recv_sock() local 422 if (newsk == NULL) in dccp_v4_request_recv_sock() 425 newinet = inet_sk(newsk); in dccp_v4_request_recv_sock() 427 sk_daddr_set(newsk, ireq->ir_rmt_addr); in dccp_v4_request_recv_sock() 428 sk_rcv_saddr_set(newsk, ireq->ir_loc_addr); in dccp_v4_request_recv_sock() 438 sk_setup_caps(newsk, dst); in dccp_v4_request_recv_sock() 440 dccp_sync_mss(newsk, dst_mtu(dst)); in dccp_v4_request_recv_sock() 442 if (__inet_inherit_port(sk, newsk) < 0) in dccp_v4_request_recv_sock() 449 return newsk; in dccp_v4_request_recv_sock() 460 inet_csk_prepare_forced_close(newsk); in dccp_v4_request_recv_sock() [all …]
|
/openbmc/linux/net/ipv4/ |
H A D | inet_connection_sock.c | 665 struct sock *newsk; in inet_csk_accept() local 691 newsk = req->sk; in inet_csk_accept() 717 lock_sock(newsk); in inet_csk_accept() 720 if (newsk->sk_memcg) { in inet_csk_accept() 732 release_sock(newsk); in inet_csk_accept() 737 if (newsk) in inet_csk_accept() 740 return newsk; in inet_csk_accept() 742 newsk = NULL; in inet_csk_accept() 843 struct sock *newsk, in inet_csk_route_child_sock() argument 1175 if (newsk) { in inet_csk_clone_lock() [all …]
|
H A D | tcp_minisocks.c | 485 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in tcp_create_openreq_child() local 493 if (!newsk) in tcp_create_openreq_child() 496 newicsk = inet_csk(newsk); in tcp_create_openreq_child() 497 newtp = tcp_sk(newsk); in tcp_create_openreq_child() 525 newsk->sk_txhash = READ_ONCE(treq->txhash); in tcp_create_openreq_child() 528 tcp_init_xmit_timers(newsk); in tcp_create_openreq_child() 531 if (sock_flag(newsk, SOCK_KEEPOPEN)) in tcp_create_openreq_child() 532 inet_csk_reset_keepalive_timer(newsk, in tcp_create_openreq_child() 576 tcp_bpf_clone(sk, newsk); in tcp_create_openreq_child() 580 return newsk; in tcp_create_openreq_child()
|
H A D | tcp_ipv4.c | 1569 struct sock *newsk; in tcp_v4_syn_recv_sock() local 1581 if (!newsk) in tcp_v4_syn_recv_sock() 1587 newtp = tcp_sk(newsk); in tcp_v4_syn_recv_sock() 1617 sk_setup_caps(newsk, dst); in tcp_v4_syn_recv_sock() 1624 tcp_initialize_rcv_mss(newsk); in tcp_v4_syn_recv_sock() 1634 sk_gso_disable(newsk); in tcp_v4_syn_recv_sock() 1652 bh_unlock_sock(newsk); in tcp_v4_syn_recv_sock() 1653 sock_put(newsk); in tcp_v4_syn_recv_sock() 1654 newsk = NULL; in tcp_v4_syn_recv_sock() 1657 return newsk; in tcp_v4_syn_recv_sock() [all …]
|
/openbmc/linux/net/ipv6/ |
H A D | tcp_ipv6.c | 1218 if (!newsk) in tcp_v6_syn_recv_sock() 1221 inet_sk(newsk)->pinet6 = tcp_inet6_sk(newsk); in tcp_v6_syn_recv_sock() 1259 tcp_sync_mss(newsk, inet_csk(newsk)->icsk_pmtu_cookie); in tcp_v6_syn_recv_sock() 1261 return newsk; in tcp_v6_syn_recv_sock() 1276 if (!newsk) in tcp_v6_syn_recv_sock() 1288 inet_sk(newsk)->pinet6 = tcp_inet6_sk(newsk); in tcp_v6_syn_recv_sock() 1368 tcp_done(newsk); in tcp_v6_syn_recv_sock() 1376 tcp_done(newsk); in tcp_v6_syn_recv_sock() 1398 sock_put(newsk); in tcp_v6_syn_recv_sock() 1399 newsk = NULL; in tcp_v6_syn_recv_sock() [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | lsm_cgroup.c | 167 int BPF_PROG(socket_clone, struct sock *newsk, const struct request_sock *req) in BPF_PROG() argument 171 if (!newsk) in BPF_PROG() 175 if (bpf_setsockopt(newsk, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio))) in BPF_PROG() 180 if (bpf_getsockopt(newsk, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio))) in BPF_PROG()
|
H A D | lsm_cgroup_nonvoid.c | 10 int BPF_PROG(nonvoid_socket_clone, struct sock *newsk, const struct request_sock *req) in BPF_PROG() argument
|
/openbmc/linux/net/core/ |
H A D | sock.c | 2301 struct sock *newsk; in sk_clone_lock() local 2304 if (!newsk) in sk_clone_lock() 2307 sock_copy(newsk, sk); in sk_clone_lock() 2313 get_net_track(sock_net(newsk), &newsk->ns_tracker, priority); in sk_clone_lock() 2321 __netns_tracker_alloc(sock_net(newsk), &newsk->ns_tracker, in sk_clone_lock() 2326 bh_lock_sock(newsk); in sk_clone_lock() 2327 newsk->sk_backlog.head = newsk->sk_backlog.tail = NULL; in sk_clone_lock() 2374 newsk = NULL; in sk_clone_lock() 2381 newsk = NULL; in sk_clone_lock() 2391 newsk->sk_err = 0; in sk_clone_lock() [all …]
|
H A D | bpf_sk_storage.c | 134 bpf_sk_storage_clone_elem(struct sock *newsk, in bpf_sk_storage_clone_elem() argument 140 copy_selem = bpf_selem_alloc(smap, newsk, NULL, true, GFP_ATOMIC); in bpf_sk_storage_clone_elem() 154 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk) in bpf_sk_storage_clone() argument 161 RCU_INIT_POINTER(newsk->sk_bpf_storage, NULL); in bpf_sk_storage_clone() 187 copy_selem = bpf_sk_storage_clone_elem(newsk, smap, selem); in bpf_sk_storage_clone() 198 ret = bpf_local_storage_alloc(newsk, smap, copy_selem, GFP_ATOMIC); in bpf_sk_storage_clone() 202 &newsk->sk_omem_alloc); in bpf_sk_storage_clone()
|
/openbmc/linux/drivers/net/ethernet/chelsio/inline_crypto/chtls/ |
H A D | chtls_cm.c | 1123 struct sock *newsk; in chtls_recv_sock() local 1131 if (!newsk) in chtls_recv_sock() 1186 tp = tcp_sk(newsk); in chtls_recv_sock() 1219 csk->sk = newsk; in chtls_recv_sock() 1246 return newsk; in chtls_recv_sock() 1255 tcp_done(newsk); in chtls_recv_sock() 1300 struct sock *newsk; in chtls_pass_accept_request() local 1317 if (newsk) { in chtls_pass_accept_request() 1400 if (!newsk) in chtls_pass_accept_request() 1406 reply_skb->sk = newsk; in chtls_pass_accept_request() [all …]
|
/openbmc/linux/net/sctp/ |
H A D | ipv6.c | 495 newnp = inet6_sk(newsk); in sctp_v6_copy_ip_options() 776 struct sock *newsk; in sctp_v6_create_accept_sk() local 781 if (!newsk) in sctp_v6_create_accept_sk() 784 sock_init_data(NULL, newsk); in sctp_v6_create_accept_sk() 786 sctp_copy_sock(newsk, sk, asoc); in sctp_v6_create_accept_sk() 794 newnp = inet6_sk(newsk); in sctp_v6_create_accept_sk() 801 sctp_v6_copy_ip_options(sk, newsk); in sctp_v6_create_accept_sk() 810 if (newsk->sk_prot->init(newsk)) { in sctp_v6_create_accept_sk() 811 sk_common_release(newsk); in sctp_v6_create_accept_sk() 812 newsk = NULL; in sctp_v6_create_accept_sk() [all …]
|
H A D | protocol.c | 181 newinet = inet_sk(newsk); in sctp_v4_copy_ip_options() 589 if (!newsk) in sctp_v4_create_accept_sk() 592 sock_init_data(NULL, newsk); in sctp_v4_create_accept_sk() 594 sctp_copy_sock(newsk, sk, asoc); in sctp_v4_create_accept_sk() 595 sock_reset_flag(newsk, SOCK_ZAPPED); in sctp_v4_create_accept_sk() 597 sctp_v4_copy_ip_options(sk, newsk); in sctp_v4_create_accept_sk() 599 newinet = inet_sk(newsk); in sctp_v4_create_accept_sk() 603 if (newsk->sk_prot->init(newsk)) { in sctp_v4_create_accept_sk() 604 sk_common_release(newsk); in sctp_v4_create_accept_sk() 605 newsk = NULL; in sctp_v4_create_accept_sk() [all …]
|
H A D | socket.c | 4853 struct sock *newsk = NULL; in sctp_accept() local 4885 if (!newsk) { in sctp_accept() 4895 sk_common_release(newsk); in sctp_accept() 4896 newsk = NULL; in sctp_accept() 4902 return newsk; in sctp_accept() 9454 newsk->sk_type = sk->sk_type; in sctp_copy_sock() 9456 newsk->sk_flags = sk->sk_flags; in sctp_copy_sock() 9460 newsk->sk_reuse = sk->sk_reuse; in sctp_copy_sock() 9475 newinet = inet_sk(newsk); in sctp_copy_sock() 9488 inet_set_bit(MC_LOOP, newsk); in sctp_copy_sock() [all …]
|
/openbmc/linux/net/phonet/ |
H A D | pep.c | 766 struct sock *newsk = NULL; in pep_sock_accept() local 830 if (unlikely(newsk)) { in pep_sock_accept() 831 __sock_put(newsk); in pep_sock_accept() 832 newsk = NULL; in pep_sock_accept() 840 if (!newsk) { in pep_sock_accept() 846 sock_init_data(NULL, newsk); in pep_sock_accept() 847 newsk->sk_state = TCP_SYN_RECV; in pep_sock_accept() 852 newpn = pep_sk(newsk); in pep_sock_accept() 873 sock_put(newsk); in pep_sock_accept() 874 newsk = NULL; in pep_sock_accept() [all …]
|
H A D | socket.c | 298 struct sock *newsk; in pn_socket_accept() local 304 newsk = sk->sk_prot->accept(sk, flags, &err, kern); in pn_socket_accept() 305 if (!newsk) in pn_socket_accept() 308 lock_sock(newsk); in pn_socket_accept() 309 sock_graft(newsk, newsock); in pn_socket_accept() 311 release_sock(newsk); in pn_socket_accept()
|
/openbmc/linux/include/net/ |
H A D | bpf_sk_storage.h | 32 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk); 42 struct sock *newsk) in bpf_sk_storage_clone() argument
|
H A D | inet_common.h | 35 struct sock *newsk);
|
/openbmc/linux/net/tipc/ |
H A D | topsrv.c | 460 struct sock *newsk; in tipc_topsrv_accept() local 482 newsk = newsock->sk; in tipc_topsrv_accept() 483 write_lock_bh(&newsk->sk_callback_lock); in tipc_topsrv_accept() 484 newsk->sk_data_ready = tipc_conn_data_ready; in tipc_topsrv_accept() 485 newsk->sk_write_space = tipc_conn_write_space; in tipc_topsrv_accept() 486 newsk->sk_user_data = con; in tipc_topsrv_accept() 487 write_unlock_bh(&newsk->sk_callback_lock); in tipc_topsrv_accept() 490 newsk->sk_data_ready(newsk); in tipc_topsrv_accept()
|
/openbmc/linux/security/selinux/include/ |
H A D | netlabel.h | 46 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk); 116 struct sock *newsk) in selinux_netlbl_sctp_sk_clone() argument
|
/openbmc/linux/net/llc/ |
H A D | llc_conn.c | 764 struct sock *newsk = llc_sk_alloc(sock_net(sk), sk->sk_family, GFP_ATOMIC, in llc_create_incoming_sock() local 768 if (!newsk) in llc_create_incoming_sock() 770 newllc = llc_sk(newsk); in llc_create_incoming_sock() 775 llc_sap_add_socket(llc->sap, newsk); in llc_create_incoming_sock() 778 return newsk; in llc_create_incoming_sock() 805 struct sock *newsk = llc_create_incoming_sock(sk, skb->dev, in llc_conn_handler() local 807 if (!newsk) in llc_conn_handler() 809 skb_set_owner_r(skb, newsk); in llc_conn_handler()
|
H A D | af_llc.c | 700 struct sock *sk = sock->sk, *newsk; in llc_ui_accept() local 727 newsk = skb->sk; in llc_ui_accept() 729 llc_ui_sk_init(newsock, newsk); in llc_ui_accept() 730 sock_reset_flag(newsk, SOCK_ZAPPED); in llc_ui_accept() 731 newsk->sk_state = TCP_ESTABLISHED; in llc_ui_accept() 734 newllc = llc_sk(newsk); in llc_ui_accept()
|
/openbmc/linux/net/mptcp/ |
H A D | protocol.c | 3186 newnp = inet6_sk(newsk); in mptcp_copy_ip6_options() 3206 newinet = inet_sk(newsk); in mptcp_copy_ip_options() 3857 struct sock *ssk, *newsk; in mptcp_stream_accept() local 3871 if (!newsk) in mptcp_stream_accept() 3874 pr_debug("newsk=%p, subflow is mptcp=%d", newsk, sk_is_mptcp(newsk)); in mptcp_stream_accept() 3875 if (sk_is_mptcp(newsk)) { in mptcp_stream_accept() 3890 newsk = new_mptcp_sock; in mptcp_stream_accept() 3894 lock_sock(newsk); in mptcp_stream_accept() 3898 msk = mptcp_sk(newsk); in mptcp_stream_accept() 3923 lock_sock(newsk); in mptcp_stream_accept() [all …]
|
/openbmc/linux/net/unix/ |
H A D | af_unix.c | 1511 if (IS_ERR(newsk)) { in unix_stream_connect() 1512 err = PTR_ERR(newsk); in unix_stream_connect() 1513 newsk = NULL; in unix_stream_connect() 1588 unix_peer(newsk) = sk; in unix_stream_connect() 1590 newsk->sk_type = sk->sk_type; in unix_stream_connect() 1591 init_peercred(newsk); in unix_stream_connect() 1592 newu = unix_sk(newsk); in unix_stream_connect() 1625 sock_hold(newsk); in unix_stream_connect() 1628 unix_peer(sk) = newsk; in unix_stream_connect() 1647 if (newsk) in unix_stream_connect() [all …]
|