mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
NFSv4: Revert commit 5f83d86cf5 ("NFSv4.x: Fix wraparound issues..")
commitfc40724fc6upstream. The correct behaviour for NFSv4 sequence IDs is to wrap around to the value 0 after 0xffffffff. See https://tools.ietf.org/html/rfc5661#section-2.10.6.1 Fixes:5f83d86cf5("NFSv4.x: Fix wraparound issues when validing...") Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5b7f582e80
commit
cdc83c3669
@@ -402,11 +402,8 @@ validate_seqid(const struct nfs4_slot_table *tbl, const struct nfs4_slot *slot,
|
||||
return htonl(NFS4ERR_SEQ_FALSE_RETRY);
|
||||
}
|
||||
|
||||
/* Wraparound */
|
||||
if (unlikely(slot->seq_nr == 0xFFFFFFFFU)) {
|
||||
if (args->csa_sequenceid == 1)
|
||||
return htonl(NFS4_OK);
|
||||
} else if (likely(args->csa_sequenceid == slot->seq_nr + 1))
|
||||
/* Note: wraparound relies on seq_nr being of type u32 */
|
||||
if (likely(args->csa_sequenceid == slot->seq_nr + 1))
|
||||
return htonl(NFS4_OK);
|
||||
|
||||
/* Misordered request */
|
||||
|
||||
Reference in New Issue
Block a user