nfsd4: fix null dereference creating nfsv4 callback client
commit886e3b7fe6054230c89ae078a09565ed183ecc73
authorJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 15 Sep 2009 16:22:42 +0000 (15 12:22 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 16 Sep 2009 00:49:33 +0000 (15 20:49 -0400)
tree95978914331e3b9f4e2f22f7c645ec039f6d77aa
parent4be36ca0cefc09725f52a9590d061399d3e524d7
nfsd4: fix null dereference creating nfsv4 callback client

On setting up the callback to the client, we attempt to use the same
authentication flavor the client did.  We find an rpc cred to use by
calling rpcauth_lookup_credcache(), which assumes that the given
authentication flavor has a credentials cache.  However, this is not
required to be true--in particular, auth_null does not use one.
Instead, we should call the auth's lookup_cred() method.

Without this, a client attempting to mount using nfsv4 and auth_null
triggers a null dereference.

Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4callback.c