]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: avoid race conditions with parallel reconnects
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 20 Mar 2023 06:08:19 +0000 (06:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:34 +0000 (12:10 +0200)
commit9dad2690b1269a75cb8e7de87ecdcc2d2550aed2
treed4eb8d8584838adce2f9233857060c0716df8e02
parenta5698f3ebb785aeb73e38497a1f029c9a4b93966
cifs: avoid race conditions with parallel reconnects

[ Upstream commit bc962159e8e326af634a506508034a375bf2b858 ]

When multiple processes/channels do reconnects in parallel
we used to return success immediately
negotiate/session-setup/tree-connect, causing race conditions
between processes that enter the function in parallel.
This caused several errors related to session not found to
show up during parallel reconnects.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/connect.c
fs/cifs/smb2pdu.c
fs/cifs/smb2transport.c