]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
rxrpc: Fix unexposed client conn release
authorDavid Howells <dhowells@redhat.com>
Sat, 17 Sep 2016 09:49:12 +0000 (10:49 +0100)
committerDavid Howells <dhowells@redhat.com>
Sat, 17 Sep 2016 09:53:21 +0000 (10:53 +0100)
If the last call on a client connection is release after the connection has
had a bunch of calls allocated but before any DATA packets are sent (so
that it's not yet marked RXRPC_CONN_EXPOSED), an assertion will happen in
rxrpc_disconnect_client_call().

af_rxrpc: Assertion failed - 1(0x1) >= 2(0x2) is false
------------[ cut here ]------------
kernel BUG at ../net/rxrpc/conn_client.c:753!

This is because it's expecting the conn to have been exposed and to have 2
or more refs - but this isn't necessarily the case.

Simply remove the assertion.  This allows the conn to be moved into the
inactive state and deleted if it isn't resurrected before the final put is
called.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/conn_client.c

index 5a675c43cace11f3658a2d274d5c108de5b46c35..226bc910e556c20df7ba900b37fabdf63b92893c 100644 (file)
@@ -721,7 +721,6 @@ void rxrpc_disconnect_client_call(struct rxrpc_call *call)
        }
 
        ASSERTCMP(rcu_access_pointer(chan->call), ==, call);
-       ASSERTCMP(atomic_read(&conn->usage), >=, 2);
 
        /* If a client call was exposed to the world, we save the result for
         * retransmission.