]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
rxrpc: Fix an overget of the conn bundle when setting up a client conn
authorDavid Howells <dhowells@redhat.com>
Mon, 14 Sep 2020 14:58:14 +0000 (15:58 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 14 Sep 2020 15:18:59 +0000 (16:18 +0100)
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: 245500d853e9 ("rxrpc: Rewrite the client connection manager")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/conn_client.c

index 0eb36ba524858b48dd1c7e1ce49b565af464120a..78c845a4f1ad157b66f82d43bb46f0a6ffc98a46 100644 (file)
@@ -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++)