]> Pileus Git - ~andy/linux/blobdiff - fs/nfsd/nfs4callback.c
nfsd4: fix null dereference creating nfsv4 callback client
[~andy/linux] / fs / nfsd / nfs4callback.c
index 81d1c5285dcc565631e3ae5607f6dc40cb010677..4abb88264c72ff4a2d0605f5d6f37506ed706aef 100644 (file)
@@ -56,7 +56,7 @@
 /* Index of predefined Linux callback client operations */
 
 enum {
-        NFSPROC4_CLNT_CB_NULL = 0,
+       NFSPROC4_CLNT_CB_NULL = 0,
        NFSPROC4_CLNT_CB_RECALL,
 };
 
@@ -437,6 +437,7 @@ static struct rpc_cred *lookup_cb_cred(struct nfs4_cb_conn *cb)
        struct auth_cred acred = {
                .machine_cred = 1
        };
+       struct rpc_auth *auth = cb->cb_client->cl_auth;
 
        /*
         * Note in the gss case this doesn't actually have to wait for a
@@ -444,8 +445,7 @@ static struct rpc_cred *lookup_cb_cred(struct nfs4_cb_conn *cb)
         * non-uptodate cred which the rpc state machine will fill in with
         * a refresh_upcall later.
         */
-       return rpcauth_lookup_credcache(cb->cb_client->cl_auth, &acred,
-                                                       RPCAUTH_LOOKUP_NEW);
+       return auth->au_ops->lookup_cred(auth, &acred, RPCAUTH_LOOKUP_NEW);
 }
 
 void do_probe_callback(struct nfs4_client *clp)