Fix null dereference in call_allocate
authorJ. Bruce Fields <bfields@redhat.com>
Sun, 12 Sep 2010 23:55:25 +0000 (19:55 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 12 Sep 2010 23:55:25 +0000 (19:55 -0400)
commitf2d47d02fd84343a3c5452daca6ed12c75618aff
tree7f7e70c78070021d28e319bc1124cea283ec1e84
parent49553c2ef88749dd502687f4eb9c258bb10a4f44
Fix null dereference in call_allocate

In call_allocate we need to reach the auth in order to factor au_cslack
into the allocation.

As of a17c2153d2e271b0cbacae9bed83b0eaa41db7e1 "SUNRPC: Move the bound
cred to struct rpc_rqst", call_allocate attempts to do this by
dereferencing tk_client->cl_auth, however this is not guaranteed to be
defined--cl_auth can be zero in the case of gss context destruction (see
rpc_free_auth).

Reorder the client state machine to bind credentials before allocating,
so that we can instead reach the auth through the cred.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
net/sunrpc/clnt.c