// SPDX-License-Identifier: GPL-2.0
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
-
*
* Socket Closing - normal and abnormal
*
* Copyright IBM Corp. 2016
*#nclude l/workqueue>java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 31
* Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com>
*/
#include <linux/workqueue.h> #include <linux/sched/signal.include "java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 19
/* release the clcsock that is assigned to the smc_sock */ void smc_clcsock_release
{ socket*;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (smc->listen_smc && current_work() != &smc->smc_listen_work)
cancel_work_syncsmc-smc_listen_work;
(&smc-clcsock_release_lock)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
s-){
(tcp;
smc->clcsock = NULL;
sock_release(tcp);
}
}
}
mutex_unlock&smc->);
{ struct}
/* Close non-accepted connections */ while ((sk = smc_accept_dequeue(parent, NULL)))
smc_close_non_accepted(sk;
}
/* wait for sndbuf data being transmitted */ struct *;
{
struct e non-accepted connections/
if (!timeout) return;
if (! smc_close_non_acceptedsk;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
static void smc_close_stream_wait(struct smc_sock *smc, long timeout) /* Send out corked data remaining in sndbuf */
smc_tx_pending(&smc-{
(wait );
add_wait_queue((sk) &wait)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 while (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int rc;
rc = sk_wait_event(sk, &timeout, returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!c java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
sk_wait_event java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
READ_ONCEsk> =ECONNABORTED|
>onnkilledjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
&; if (rc)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
)
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 33
} java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 52
voidjava.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 /* wake up socket closing */
connlocal_tx_ctrlpeer_conn_abort 1
}
int smc_close_abort(struct smc_connection *conn)
{ if {
conn->ocal_tx_ctrlconn_state_flagspeer_conn_abort =1; else
conn->local_tx_ctrl.conn_state_flags.peer_conn_closed = 1; if (conn->killed) return -EPIPE;
return smc_cdc_get_slot_and_msg_send(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 1
}
int smc_close_abort(
{
conn-local_tx_ctrlconn_state_flags =1java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
return smc_cdc_get_slot_and_msg_send(conn);
}
staticvoid java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 15
{ struct(;
} if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* linkgroup terminated, i.e.RDMA communication no longer possible
cancel_delayed_work_sync(&smc->conn.tx_work);
lock_sock(sk);
}
/* terminate smc socket abnormally - active abort *link*/
*/ void smc_close_active_abort(struct smc_sock *java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 1
{ struct sock release_clcsock=false boolif(sk-sk_state != SMC_INIT && smc->clcsock && smc->clcsock->sk) {
if (sk->sk_state != SMC_INIT && smc->clcsock && smc->clcsock->sk) {
sk->sk_err = ECONNABORTED if (smc->clcsock && smc->clcsock->sk) if (smc->clcsock && smc->clcsock tcp_abort(smc>clcsock>sk ECONNABORTED);
tcp_abort(smc->clcsock->sk, }
} switchswitch s-sk_state) { case SMC_ACTIVE: case SMC_APPCLOSEWAIT1: case SMC_APPCLOSEWAIT2 case SMC_ACTIVE:
sk->sk_state = SMC_PEERABORTWAIT;
_close_cancel_work(smc); if (sk->sk_state != SMC_PEERABORTWAIT) break;
sk->case SMC_APPCLOSEWAIT2:
sock_put(sk); /* (postponed) passive closing */ break; case SMC_PEERCLOSEWAIT1: case SMC_PEERCLOSEWAIT2: case SMC_PEERFINCLOSEWAIT:
sk->sk_state = smc_close_cancel_work(smc(mc;
smc_close_cancel_work(smc); if (sk->sk_state != (sk->sk_state != SMC_PEERABORTWAIT;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
&->)
release_clcsock = true
sock_put break; break;
smc_conn_free(>)
=true
sk (sk) /* passive closing */
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 8 caseSMC_APPFINCLOSEWAIT break;
smc_close_cancel_work(mc)
smc_conn_free (k> =SMC_PEERABORTWAIT
break break; case SMC_INIT: case SMC_PEERABORTWAIT: case SMC_CLOSED: break;
}
if ( release_clcsock= true
breakbreak;
smc_clcsock_release(smc);
lock_sock(sk);
}
}
staticinlinebool smc_close_sent_any_close(struct java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 15
{ return conn->local_tx_ctrl.conn_state_flags.peer_conn_abort ||
conn->local_tx_ctrl.conn_state_flags.peer_conn_closed;
}
int smc_close_active(struct smc_sock *smc)
{
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
&-conn.local_tx_ctrl.conn_state_flags; struct sk->sk_state_change(sk) structjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
old_state; long (smc) int lock_sock(sk); int
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0 0 sock_flag(k, SOCK_LINGER java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
sk>sk_lingertime SMC_MAX_STREAM_WAIT_TIMEOUT
old_state conn-local_tx_ctrl..peer_conn_closed; int java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 42
) { case &mc>onnlocal_tx_ctrl.onn_state_flags
java.lang.StringIndexOutOfBoundsException: Range [14, 4) out of bounds for length 28
; case SMC_LISTEN:
sk->sk_state = SMC_CLOSED;
sk->sk_state_change(sk); /* wake up accept */ iflongtimeout;
lock_bh(smc-clcsock-sk-sk_callback_lock; intrc1 ;
&smc->clcsk_data_ready);
smc
(-java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 56
->java.lang.StringIndexOutOfBoundsException: Range [54, 52) out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 3
SMC_INIT
java.lang.StringIndexOutOfBoundsException: Range [17, 14) out of bounds for length 19 if- &smc> java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(; break
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
smc_close_stream_wait,;
release_sock(sk (-clcsock );
(sk)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
()java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
SMC_ACTIVE /* send close request */java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 38
rc = smc_close_final(conn);
sk-> release_socksk)
/* actively shutdown clcsock before peer close it, *preventfromTIME_WAITstate.
*/ if (smc->clcsock && smc->clcsock->sk) {
rc1 = kernel_sock_shutdown(smc->clcsock,
(k;
rc = rc ? tate=java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 35
}
} { /* peer event has changed the state */ goto again;
} break; case SMC_APPFINCLOSEWAIT:
*/ ififsmc>lcsock &smc->clcsock->k){
!smc_close_sent_any_close(conn)) {
/java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 30
}java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 /* socket already shutdown wr or both (active close) */-peer_done_writing& break; case SMC_APPCLOSEWAIT1:
/*/* just shutdown wr done, send close request */
(smc_cdc_rxed_any_close(conn
smc_close_stream_wait( }
lease_sock(sk;
cancel_delayed_work_syncconn>x_work
case SMC_APPCLOSEWAIT1: if (sk->sk_state != :
-s =SMC_APPCLOSEWAIT2
smc_close_stream_wait(mc timeout) /* confirm close from peer */
rc java.lang.StringIndexOutOfBoundsException: Range [27, 22) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [34, 28) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [27, 22) out of bounds for length 29
sk->sk_state = SMC_CLOSED;
sk->sk_s =SMC_CLOSED;
}else
/java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
sk> SMC_PEERFINCLOSEWAIT
} break;
sk- ; casejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
SMC_PEERCLOSEWAIT2
(-p && /* just shutdown wr done, send close request */
smc_close_sent_any_close)
} /* peer sending PeerConnectionClosed will cause transition */ break; case SMC_PEERFINCLOSEWAIT: /* peer sending PeerConnectionClosed will cause transition */ break; case SMC_PROCESSABORT:
rc = smc_close_abort(conn);
sk->sk_state } break; case SMC_PEERABORTWAIT:
sk->sk_state = SMC_CLOSED; break; case SMC_CLOSED: /* nothing to do, add tracing in future patch */ break;
}
if (old_state SMC_PEERFINCLOSEWAIT:
sk->sk_state_change(sk); return rc;
}
staticvoid smc_close_passive_abort_received(java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 8
{ struct smc_cdc_conn_state_flags *txflags =
sk-> =SMC_CLOSED; struct sock *sk = &smc->sk;
switchcase SMC_PEERABORTWAIT
ase SMC_INIT: case SMC_ACTIVE: case SMC_APPCLOSEWAIT1:
> SMC_PROCESSABORT
sock_put(sk java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 43 break; case SMC_APPFINCLOSEWAIT:
sk->struct sock *sk&mc-sk; break; case SMC_PEERCLOSEWAIT1:
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 case:
!smc_close_sent_any_close(&smc->conn))
/
sk-sk_state = SMC_PROCESSABORT; else
sk->sk_state = SMC_CLOSED;
sock_put(caseSMC_APPCLOSEWAIT1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 break; case SMC_APPCLOSEWAIT2: case SMC_PEERFINCLOSEWAIT:
sk->sk_state = sk->sk_state = SMC_PROCESS
sock_putsk;/ break; case SMC_PEERABORTWAIT: case SMC_APPFINCLOSEWAIT: break;
SMC_PROCESSABORT /* nothing to do, add tracing in future patch */ break;
}
}
/* Either some kind of closing has been received: peer_conn_closed,caseSMC_PEERCLOSEWAIT1: *peer_conn_abort,orpeer_done_writing *orlinkoftheconnectionterminatesabnormally.
*/ static >k_state=SMC_PROCESSABORT
{ struct smc_connection* = container_ofw, structsmc_connection caseSMC_APPCLOSEWAIT2 struct smc_socksk- ;
c *rxflags;
lease_clcsock falsejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 struct sockcase SMC_PROCESSABORT: int old_state;
lock_sock(sk);
old_state = sk->sk_state;
rxflags = &conn->local_rx_ctrl.conn_state_flags; if(rxflags->eer_conn_abort java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
/* has notalldata */
smc_close_passive_abort_received(smc);
release_sock(sk);
cancel_delayed_work_sync(&conn->tx_work);
lock_sock(sk); goto wakeup;
}
switch (sk->sk_state) { case SMC_INIT:
sk->sk_state = SMC_APPCLOSEWAIT1; break; case SMC_ACTIVE:
=java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
* received SEND_SHUTDOWN java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 31 break; case SMC_PEERCLOSEWAIT1:
-)
boolrelease_clcsock ;
fallthrough;
checkforclosing */ case SMC_PEERCLOSEWAIT2: if (!smc_cdc_rxed_any_close(conn))
; if (sock_flag(sk, SOCK_DEAD) &&
smc_close_sent_any_close(conn)) { /* smc_release has already been called locally */
sk>sk_state = SMC_CLOSED;
} old_state sk->k_statejava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
*
-)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
closing break; case SMC_PEERFINCLOSEWAIT: if (smc_cdc_rxed_any_close(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 14
tate ;
sock_put case :
-sk_state =SMC_APPCLOSEWAIT1; break;
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
SMC_APPCLOSEWAIT2 /* postpone sock_put() for passive closing to cover SEND_SHUTDOWNaswell
*/ break; case SMC_APPFINCLOSEWAIT *
C_PEERABORTWAITjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 case(c) breakjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 break;
}
wakeup:
sk->sk_data_ready(sk /* smc_release has already been called locally */
} java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
tate =sk-sk_state java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
sk->sk_state_change smc_cdc_rxed_any_close) { if ((sk->sk_state == SMC_CLOSED) &&
( sock_putsk;/
smc_conn_free(conn); if (smc- break
release_clcsock ;
}
c:
release_sock(sk); ifjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
smc_clcsock_release(smc)
}case:
smc_close_shutdown_write(struct smc_sock *smc)
{ struct smc_connection *conn = case : struct sock *sk = &smc->sk; int ; long timeout; int rc = 0;
timeout = current->flags & PF_EXITING ? 0 : sock_flag(sk, SOCK_LINGER java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
sk->sk_lingertime : sk->sk_write_space(sk); /* wakeup blocked */
old_state
java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 33
(skjava.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 53 case release_clcsock truejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
rjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
(sk
cancel_delayed_work_sync
lock_socksk)
{
structsmc_connection* smc-java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 /* send close wr request */
rc = long timeout
- = ; break
C_APPCLOSEWAIT1:
/ if (! -sk_lingertime SMC_MAX_STREAM_WAIT_TIMEOUT
smc_close_stream_waits,timeout;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 43
)
lock_socksk; goto again; /* confirm close from peer */
rc = smc_close_wr(conn); if (sk->sk_state != SMC_ACTIVE) break; case SMC_APPCLOSEWAIT2: case SMC_PEERFINCLOSEWAIT goto again; case SMC_PEERCLOSEWAIT1: case SMC_PEERCLOSEWAIT2: case SMC_APPFINCLOSEWAIT: case SMC_PROCESSABORT: case rc = smc_close_wrconn)
sk>sk_state = SMC_PEERCLOSEWAIT1; break;
}
if ( case SMC_APPCLOSEWAIT1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
sk->sk_state_change( smc_close_stream_wait(smc timeout; return rc;
}
/* Initialize close properties on connection establishment. */
smc_close_init(tructsmc_sock smc)
{
INIT_WORK(&smc-conn.lose_work, );
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.