提交 41eb1670 编写于 作者: K Kinglong Mee 提交者: J. Bruce Fields

nfsd: Add missing gen_confirm in nfsd4_setclientid()

Commit 294ac32e "nfsd: protect clid and verifier generation with
client_lock" moved gen_confirm() to gen_clid().

After that commit, setclientid will return a bad reply with all-zero
verifier after copy_clid().
Signed-off-by: NKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 19311aa8
...@@ -3049,10 +3049,11 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -3049,10 +3049,11 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
unconf = find_unconfirmed_client_by_name(&clname, nn); unconf = find_unconfirmed_client_by_name(&clname, nn);
if (unconf) if (unconf)
unhash_client_locked(unconf); unhash_client_locked(unconf);
if (conf && same_verf(&conf->cl_verifier, &clverifier)) if (conf && same_verf(&conf->cl_verifier, &clverifier)) {
/* case 1: probable callback update */ /* case 1: probable callback update */
copy_clid(new, conf); copy_clid(new, conf);
else /* case 4 (new client) or cases 2, 3 (client reboot): */ gen_confirm(new, nn);
} else /* case 4 (new client) or cases 2, 3 (client reboot): */
gen_clid(new, nn); gen_clid(new, nn);
new->cl_minorversion = 0; new->cl_minorversion = 0;
gen_callback(new, setclid, rqstp); gen_callback(new, setclid, rqstp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册