]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
NFSD: copy the whole verifier in nfsd_copy_write_verifier
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Feb 2023 15:07:59 +0000 (10:07 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 20 Feb 2023 14:20:59 +0000 (09:20 -0500)
Currently, we're only memcpy'ing the first __be32. Ensure we copy into
both words.

Fixes: 91d2e9b56cf5 ("NFSD: Clean up the nfsd_net::nfssvc_boot field")
Reported-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfssvc.c

index fe5e4f73bb985a6b92e79f835c834d7e403ba01b..9c7b1ef5be4099fa2884ab0ad35719469687817d 100644 (file)
@@ -363,7 +363,7 @@ void nfsd_copy_write_verifier(__be32 verf[2], struct nfsd_net *nn)
 
        do {
                read_seqbegin_or_lock(&nn->writeverf_lock, &seq);
-               memcpy(verf, nn->writeverf, sizeof(*verf));
+               memcpy(verf, nn->writeverf, sizeof(nn->writeverf));
        } while (need_seqretry(&nn->writeverf_lock, seq));
        done_seqretry(&nn->writeverf_lock, seq);
 }