summaryrefslogtreecommitdiff
path: root/net/rxrpc/conn_client.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-07-01 09:51:50 +0300
committerDavid Howells <dhowells@redhat.com>2016-07-06 12:51:14 +0300
commit8496af50eb385c1cadff9ad396fd5359e96b6c27 (patch)
treeea5adee605917e9b7b1d3b809dc2458cbd07c271 /net/rxrpc/conn_client.c
parent995f1405610bd8446c5be37d2ffc031a7729e406 (diff)
downloadlinux-8496af50eb385c1cadff9ad396fd5359e96b6c27.tar.xz
rxrpc: Use RCU to access a peer's service connection tree
Move to using RCU access to a peer's service connection tree when routing an incoming packet. This is done using a seqlock to trigger retrying of the tree walk if a change happened. Further, we no longer get a ref on the connection looked up in the data_ready handler unless we queue the connection's work item - and then only if the refcount > 0. Note that I'm avoiding the use of a hash table for service connections because each service connection is addressed by a 62-bit number (constructed from epoch and connection ID >> 2) that would allow the client to engage in bucket stuffing, given knowledge of the hash algorithm. Peers, however, are hashed as the network address is less controllable by the client. The total number of peers will also be limited in a future commit. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_client.c')
-rw-r--r--net/rxrpc/conn_client.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
index 917db48d7f59..9e91f27b0d0f 100644
--- a/net/rxrpc/conn_client.c
+++ b/net/rxrpc/conn_client.c
@@ -132,8 +132,6 @@ rxrpc_alloc_client_connection(struct rxrpc_conn_parameters *cp, gfp_t gfp)
}
conn->params = *cp;
- conn->proto.epoch = rxrpc_epoch;
- conn->proto.cid = 0;
conn->out_clientflag = RXRPC_CLIENT_INITIATED;
conn->state = RXRPC_CONN_CLIENT;