mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
NFSv4.1: freeze the session table upon receiving NFS4ERR_BADSESSION
[ Upstream commitc907e72f58] 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:5c441544f0("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7053178436
commit
c2bf8d7b8f
@@ -921,6 +921,7 @@ out:
|
|||||||
out_noaction:
|
out_noaction:
|
||||||
return ret;
|
return ret;
|
||||||
session_recover:
|
session_recover:
|
||||||
|
set_bit(NFS4_SLOT_TBL_DRAINING, &session->fc_slot_table.slot_tbl_state);
|
||||||
nfs4_schedule_session_recovery(session, status);
|
nfs4_schedule_session_recovery(session, status);
|
||||||
dprintk("%s ERROR: %d Reset session\n", __func__, status);
|
dprintk("%s ERROR: %d Reset session\n", __func__, status);
|
||||||
nfs41_sequence_free_slot(res);
|
nfs41_sequence_free_slot(res);
|
||||||
|
|||||||
Reference in New Issue
Block a user