diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2015-07-18 01:33:31 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2015-08-10 22:05:47 +0200 |
commit | 19311aa8353644c18d609291e0078843d1c22ece (patch) | |
tree | 38ac0e3cef1d4f4363762c470366a2ef2758b4dc /fs/nfsd/nfs4state.c | |
parent | nfsd: Fix memory leak of so_owner.data in nfs4_stateowner (diff) | |
download | linux-19311aa8353644c18d609291e0078843d1c22ece.tar.xz linux-19311aa8353644c18d609291e0078843d1c22ece.zip |
nfsd: New counter for generating client confirm verifier
If using clientid_counter, it seems possible that gen_confirm could
generate the same verifier for the same client in some situations.
Add a new counter for client confirm verifier to make sure gen_confirm
generates a different verifier on each call for the same clientid.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 5018b6ecfe74..cd8c33186e26 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1899,7 +1899,7 @@ static void gen_confirm(struct nfs4_client *clp, struct nfsd_net *nn) * __force to keep sparse happy */ verf[0] = (__force __be32)get_seconds(); - verf[1] = (__force __be32)nn->clientid_counter; + verf[1] = (__force __be32)nn->clverifier_counter++; memcpy(clp->cl_confirm.data, verf, sizeof(clp->cl_confirm.data)); } |