rxrpc: Fix handling of connection failure in client call creation
authorDavid Howells <dhowells@redhat.com>
Mon, 4 Apr 2016 13:00:39 +0000 (14:00 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 6 Jul 2016 09:43:51 +0000 (10:43 +0100)
commitd1e858c5a392a50c16ce36624203032bdeb3595b
treeda1a7b0e797d236d28d881c75519fbbf7dfcfd3d
parent2c4579e4b1d5a6219522c6e970500b2fd43fe1f8
rxrpc: Fix handling of connection failure in client call creation

If rxrpc_connect_call() fails during the creation of a client connection,
there are two bugs that we can hit that need fixing:

 (1) The call state should be moved to RXRPC_CALL_DEAD before the call
     cleanup phase is invoked.  If not, this can cause an assertion failure
     later.

 (2) call->link should be reinitialised after being deleted in
     rxrpc_new_client_call() - which otherwise leads to a failure later
     when the call cleanup attempts to delete the link again.

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