From c663c5836cc73b3495f920fac03145c24c2ded66 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 8 Jun 2021 21:22:53 +0800 Subject: [PATCH] NFSv4.1: Don't process the sequence op more than once. mainline inclusion from mainline-v5.0-rc1 commit c71c46f0157348a6c1c66f7d382c770ffc212724 category: bugfix bugzilla: NA CVE: NA -------------------------------- Ensure that if we call nfs41_sequence_process() a second time for the same rpc_task, then we only process the results once. Signed-off-by: Trond Myklebust Signed-off-by: Zhang Xiaoxu Reviewed-by: Zhang Yi Signed-off-by: Yang Yingliang --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 283e4ed1aca1..c138dd107d4a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -770,7 +770,7 @@ static int nfs41_sequence_process(struct rpc_task *task, if (slot == NULL) goto out_noaction; /* don't increment the sequence number if the task wasn't sent */ - if (!RPC_WAS_SENT(task)) + if (!RPC_WAS_SENT(task) || slot->seq_done) goto out; session = slot->table->session; -- GitLab