summaryrefslogtreecommitdiff
path: root/net/rxrpc/insecure.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-10-20 11:56:36 +0300
committerDavid Howells <dhowells@redhat.com>2023-01-06 12:43:32 +0300
commita00ce28b1778fa3576575b43bdb17f60ded38b66 (patch)
tree213ef805ccc7f28552e236d9ac6c364dc69e3184 /net/rxrpc/insecure.c
parentf2cce89a074e6d2991dddc94f6b6ebe1576b8459 (diff)
downloadlinux-a00ce28b1778fa3576575b43bdb17f60ded38b66.tar.xz
rxrpc: Clean up connection abort
Clean up connection abort, using the connection state_lock to gate access to change that state, and use an rxrpc_call_completion value to indicate the difference between local and remote aborts as these can be pasted directly into the call state. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org
Diffstat (limited to 'net/rxrpc/insecure.c')
-rw-r--r--net/rxrpc/insecure.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/net/rxrpc/insecure.c b/net/rxrpc/insecure.c
index 0eb8471bfc53..29dcc7d3f51a 100644
--- a/net/rxrpc/insecure.c
+++ b/net/rxrpc/insecure.c
@@ -43,25 +43,15 @@ static void none_free_call_crypto(struct rxrpc_call *call)
}
static int none_respond_to_challenge(struct rxrpc_connection *conn,
- struct sk_buff *skb,
- u32 *_abort_code)
+ struct sk_buff *skb)
{
- struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
-
- trace_rxrpc_rx_eproto(NULL, sp->hdr.serial,
- tracepoint_string("chall_none"));
- return -EPROTO;
+ return rxrpc_abort_conn(conn, skb, RX_PROTOCOL_ERROR, -EPROTO, "RXN");
}
static int none_verify_response(struct rxrpc_connection *conn,
- struct sk_buff *skb,
- u32 *_abort_code)
+ struct sk_buff *skb)
{
- struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
-
- trace_rxrpc_rx_eproto(NULL, sp->hdr.serial,
- tracepoint_string("resp_none"));
- return -EPROTO;
+ return rxrpc_abort_conn(conn, skb, RX_PROTOCOL_ERROR, -EPROTO, "RXN");
}
static void none_clear(struct rxrpc_connection *conn)