diff options
author | David Howells <dhowells@redhat.com> | 2009-06-16 21:36:44 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 21:20:14 -0700 |
commit | 519d25679e8ae7433c758b9e74b19144f61b90f8 (patch) | |
tree | e458a5fbf4e37568133fd2488772e98c159fca2b /net/rxrpc/ar-connection.c | |
parent | 0dd5198672dd2bbeb933862e1fc82162e0b636be (diff) | |
download | op-kernel-dev-519d25679e8ae7433c758b9e74b19144f61b90f8.zip op-kernel-dev-519d25679e8ae7433c758b9e74b19144f61b90f8.tar.gz |
RxRPC: Don't attempt to reuse aborted connections
Connections that have seen a connection-level abort should not be reused
as the far end will just abort them again; instead a new connection
should be made.
Connection-level aborts occur due to such things as authentication
failures.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/rxrpc/ar-connection.c')
-rw-r--r-- | net/rxrpc/ar-connection.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c index 67e38a0..9f1ce84 100644 --- a/net/rxrpc/ar-connection.c +++ b/net/rxrpc/ar-connection.c @@ -444,6 +444,11 @@ int rxrpc_connect_call(struct rxrpc_sock *rx, conn = list_entry(bundle->avail_conns.next, struct rxrpc_connection, bundle_link); + if (conn->state >= RXRPC_CONN_REMOTELY_ABORTED) { + list_del_init(&conn->bundle_link); + bundle->num_conns--; + continue; + } if (--conn->avail_calls == 0) list_move(&conn->bundle_link, &bundle->busy_conns); @@ -461,6 +466,11 @@ int rxrpc_connect_call(struct rxrpc_sock *rx, conn = list_entry(bundle->unused_conns.next, struct rxrpc_connection, bundle_link); + if (conn->state >= RXRPC_CONN_REMOTELY_ABORTED) { + list_del_init(&conn->bundle_link); + bundle->num_conns--; + continue; + } ASSERTCMP(conn->avail_calls, ==, RXRPC_MAXCALLS); conn->avail_calls = RXRPC_MAXCALLS - 1; ASSERT(conn->channels[0] == NULL && |