cifs: fix missing spinlock around update to ses->status
authorSteve French <stfrench@microsoft.com>
Thu, 24 Jun 2021 20:28:04 +0000 (15:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:01 +0000 (16:56 +0200)
commitc35b484130cc4ad29833534849faac8df1ebd9fb
tree229db52a874a7d4116f65920adfdc00ea8b18d7a
parenta72d660c0dccebfe9499ad8f0b80946b26633560
cifs: fix missing spinlock around update to ses->status

[ Upstream commit 0060a4f28a9ef45ae8163c0805e944a2b1546762 ]

In the other places where we update ses->status we protect the
updates via GlobalMid_Lock. So to be consistent add the same
locking around it in cifs_put_smb_ses where it was missing.

Addresses-Coverity: 1268904 ("Data race condition")
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/cifsglob.h
fs/cifs/connect.c