• J. Bruce Fields's avatar
    Fix null dereference in call_allocate · f2d47d02
    J. Bruce Fields authored
    In call_allocate we need to reach the auth in order to factor au_cslack
    into the allocation.
    
    As of a17c2153 "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: default avatarJ. Bruce Fields <bfields@redhat.com>
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    Cc: stable@kernel.org
    f2d47d02
clnt.c 44.2 KB