summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/conn_client.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-07 16:19:25 +0200
committerDavid Howells <dhowells@redhat.com>2016-09-07 16:30:22 +0200
commit278ac0cdd5e516bdef2b9b8f5a4dd6366a5bccfe (patch)
tree66c323033869878b0ca7b740ac8bf06f94462780 /net/rxrpc/conn_client.c
parentrxrpc: Use call->peer rather than call->conn->params.peer (diff)
downloadlinux-278ac0cdd5e516bdef2b9b8f5a4dd6366a5bccfe.tar.xz
linux-278ac0cdd5e516bdef2b9b8f5a4dd6366a5bccfe.zip
rxrpc: Cache the security index in the rxrpc_call struct
Cache the security index in the rxrpc_call struct so that we can get at it even when the call has been disconnected and the connection pointer cleared. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_client.c')
-rw-r--r--net/rxrpc/conn_client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
index 82de1aeaef21..9344a8416ceb 100644
--- a/net/rxrpc/conn_client.c
+++ b/net/rxrpc/conn_client.c
@@ -348,6 +348,7 @@ static int rxrpc_get_client_conn(struct rxrpc_call *call,
if (cp->exclusive) {
call->conn = candidate;
+ call->security_ix = candidate->security_ix;
_leave(" = 0 [exclusive %d]", candidate->debug_id);
return 0;
}
@@ -395,6 +396,7 @@ static int rxrpc_get_client_conn(struct rxrpc_call *call,
candidate_published:
set_bit(RXRPC_CONN_IN_CLIENT_CONNS, &candidate->flags);
call->conn = candidate;
+ call->security_ix = candidate->security_ix;
spin_unlock(&local->client_conns_lock);
_leave(" = 0 [new %d]", candidate->debug_id);
return 0;
@@ -412,6 +414,7 @@ found_extant_conn:
spin_lock(&conn->channel_lock);
call->conn = conn;
+ call->security_ix = conn->security_ix;
list_add(&call->chan_wait_link, &conn->waiting_calls);
spin_unlock(&conn->channel_lock);
_leave(" = 0 [extant %d]", conn->debug_id);