mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
rxrpc: Only set/transmit aborts in the I/O thread
Only set the abort call completion state in the I/O thread and only transmit ABORT packets from there. rxrpc_abort_call() can then be made to actually send the packet. Further, ABORT packets should only be sent if the call has been exposed to the network (ie. at least one attempted DATA transmission has occurred for it). Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org
This commit is contained in:
@@ -430,6 +430,8 @@ void rxrpc_incoming_call(struct rxrpc_sock *rx,
|
||||
call->state = RXRPC_CALL_SERVER_SECURING;
|
||||
call->cong_tstamp = skb->tstamp;
|
||||
|
||||
__set_bit(RXRPC_CALL_EXPOSED, &call->flags);
|
||||
|
||||
spin_lock(&conn->state_lock);
|
||||
|
||||
switch (conn->state) {
|
||||
@@ -590,7 +592,7 @@ void rxrpc_release_calls_on_socket(struct rxrpc_sock *rx)
|
||||
call = list_entry(rx->to_be_accepted.next,
|
||||
struct rxrpc_call, accept_link);
|
||||
list_del(&call->accept_link);
|
||||
rxrpc_abort_call("SKR", call, 0, RX_CALL_DEAD, -ECONNRESET);
|
||||
rxrpc_propose_abort(call, RX_CALL_DEAD, -ECONNRESET, "SKR");
|
||||
rxrpc_put_call(call, rxrpc_call_put_release_sock_tba);
|
||||
}
|
||||
|
||||
@@ -598,8 +600,7 @@ void rxrpc_release_calls_on_socket(struct rxrpc_sock *rx)
|
||||
call = list_entry(rx->sock_calls.next,
|
||||
struct rxrpc_call, sock_link);
|
||||
rxrpc_get_call(call, rxrpc_call_get_release_sock);
|
||||
rxrpc_abort_call("SKT", call, 0, RX_CALL_DEAD, -ECONNRESET);
|
||||
rxrpc_send_abort_packet(call);
|
||||
rxrpc_propose_abort(call, RX_CALL_DEAD, -ECONNRESET, "SKT");
|
||||
rxrpc_release_call(rx, call);
|
||||
rxrpc_put_call(call, rxrpc_call_put_release_sock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user