Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: trond.myklebust@hammerspace.com, chuck.lever@oracle.com
Cc: willy@infradead.org, linux-nfs@vger.kernel.org
Subject: [PATCH 1/3] nfsd: copy the whole verifier in nfsd_copy_write_verifier
Date: Mon, 13 Feb 2023 16:13:43 -0500	[thread overview]
Message-ID: <20230213211345.385005-2-jlayton@kernel.org> (raw)
In-Reply-To: <20230213211345.385005-1-jlayton@kernel.org>

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)
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/nfsd/nfssvc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index fe5e4f73bb98..3a38ab304b02 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -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(*verf) * 2);
 	} while (need_seqretry(&nn->writeverf_lock, seq));
 	done_seqretry(&nn->writeverf_lock, seq);
 }
-- 
2.39.1


  reply	other threads:[~2023-02-13 21:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 21:13 [PATCH 0/3] nfsd: write verifier fixes and optimization Jeff Layton
2023-02-13 21:13 ` Jeff Layton [this message]
2023-02-13 21:13 ` [PATCH 2/3] errseq: add a new errseq_fetch helper Jeff Layton
2023-02-13 21:13 ` [PATCH 3/3] nfsd: simplify write verifier handling Jeff Layton
2023-02-14  0:49   ` Rick Macklem
2023-02-14  3:28     ` Trond Myklebust
2023-02-14 13:53       ` Jeff Layton
2023-02-14 14:58         ` Chuck Lever III
2023-02-14 15:01           ` Jeff Layton
2023-02-14 22:57         ` Rick Macklem
2023-02-14 23:16           ` Jeff Layton
2023-02-14 23:34           ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230213211345.385005-2-jlayton@kernel.org \
    --to=jlayton@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox