aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2025-02-09 07:31:26 -0500
committerChuck Lever <chuck.lever@oracle.com>2025-03-10 09:11:02 -0400
commitbf36c14972aab13409393690eca73727d9c7fd0c (patch)
treea67615655848f97d708377dc6b9d63b2a2f767d5
parentnfsd: only check RPC_SIGNALLED() when restarting rpc_task (diff)
downloadwireguard-linux-bf36c14972aab13409393690eca73727d9c7fd0c.tar.xz
wireguard-linux-bf36c14972aab13409393690eca73727d9c7fd0c.zip
nfsd: when CB_SEQUENCE gets ESERVERFAULT don't increment seq_nr
ESERVERFAULT means that the server sent a successful and legitimate reply, but the session info didn't match what was expected. Don't increment the seq_nr in that case. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r--fs/nfsd/nfs4callback.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 54f33b81d20f..a9e88df17f7a 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -1363,7 +1363,12 @@ static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback
ret = true;
break;
case -ESERVERFAULT:
- ++session->se_cb_seq_nr[cb->cb_held_slot];
+ /*
+ * Call succeeded, but the session, slot index, or slot
+ * sequence number in the response do not match the same
+ * in the server's call. The sequence information is thus
+ * untrustworthy.
+ */
nfsd4_mark_cb_fault(cb->cb_clp);
break;
case 1: