Skip to content

Commit

Permalink
rxrpc: Fix an overget of the conn bundle when setting up a client conn
Browse files Browse the repository at this point in the history
When setting up a client connection, a second ref is accidentally obtained
on the connection bundle (we get one when allocating the conn and a second
one when adding the conn to the bundle).

Fix it to only use the ref obtained by rxrpc_alloc_client_connection() and
not to add a second when adding the candidate conn to the bundle.

Fixes: 245500d ("rxrpc: Rewrite the client connection manager")
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Sep 14, 2020
1 parent 546a424 commit f1b4497
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/rxrpc/conn_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ static void rxrpc_add_conn_to_bundle(struct rxrpc_bundle *bundle, gfp_t gfp)
if (!rxrpc_may_reuse_conn(old)) {
if (old)
trace_rxrpc_client(old, -1, rxrpc_client_replace);
candidate->bundle = rxrpc_get_bundle(bundle);
candidate->bundle_shift = shift;
bundle->conns[i] = candidate;
for (j = 0; j < RXRPC_MAXCALLS; j++)
Expand Down

0 comments on commit f1b4497

Please sign in to comment.