diff options
author | David Howells <dhowells@redhat.com> | 2016-09-29 22:37:15 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-29 22:57:47 +0100 |
commit | 1e9e5c9521d3667664a6e3c97075f71afec23720 (patch) | |
tree | fb2447d0038b67d5ee980ab075047db2311ee308 /net/rxrpc/local_object.c | |
parent | 2629c7fa7c0adfdf023051b404cd538951bd0354 (diff) | |
download | op-kernel-dev-1e9e5c9521d3667664a6e3c97075f71afec23720.zip op-kernel-dev-1e9e5c9521d3667664a6e3c97075f71afec23720.tar.gz |
rxrpc: Reduce the rxrpc_local::services list to a pointer
Reduce the rxrpc_local::services list to just a pointer as we don't permit
multiple service endpoints to bind to a single transport endpoints (this is
excluded by rxrpc_lookup_local()).
The reason we don't allow this is that if you send a request to an AFS
filesystem service, it will try to talk back to your cache manager on the
port you sent from (this is how file change notifications are handled). To
prevent someone from stealing your CM callbacks, we don't let AF_RXRPC
sockets share a UDP socket if at least one of them has a service bound.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/local_object.c')
-rw-r--r-- | net/rxrpc/local_object.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index e3fad80..ff4864d5 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -86,7 +86,6 @@ static struct rxrpc_local *rxrpc_alloc_local(const struct sockaddr_rxrpc *srx) atomic_set(&local->usage, 1); INIT_LIST_HEAD(&local->link); INIT_WORK(&local->processor, rxrpc_local_processor); - INIT_HLIST_HEAD(&local->services); init_rwsem(&local->defrag_sem); skb_queue_head_init(&local->reject_queue); skb_queue_head_init(&local->event_queue); @@ -292,7 +291,7 @@ static void rxrpc_local_destroyer(struct rxrpc_local *local) mutex_unlock(&rxrpc_local_mutex); ASSERT(RB_EMPTY_ROOT(&local->client_conns)); - ASSERT(hlist_empty(&local->services)); + ASSERT(!local->service); if (socket) { local->socket = NULL; |