]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSv4.1: freeze the session table upon receiving NFS4ERR_BADSESSION
authorOlga Kornievskaia <kolga@netapp.com>
Sun, 18 Jun 2023 21:32:25 +0000 (17:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:18 +0000 (08:37 +0200)
commit18fa56ca4cb80eaf18a68d547e1ff3a56405df8b
treef779dfa571c14f00284f9b7e2b76b60730bd9e2f
parentc182d87c67e2ae57917a9908abb6cb1d3e88cbdd
NFSv4.1: freeze the session table upon receiving NFS4ERR_BADSESSION

[ Upstream commit c907e72f58ed979a24a9fdcadfbc447c51d5e509 ]

When the client received NFS4ERR_BADSESSION, it schedules recovery
and start the state manager thread which in turn freezes the
session table and does not allow for any new requests to use the
no-longer valid session. However, it is possible that before
the state manager thread runs, a new operation would use the
released slot that received BADSESSION and was therefore not
updated its sequence number. Such re-use of the slot can lead
the application errors.

Fixes: 5c441544f045 ("NFSv4.x: Handle bad/dead sessions correctly in nfs41_sequence_process()")
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c