]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: make locking consistent around the server session status
authorSteve French <stfrench@microsoft.com>
Thu, 1 Jul 2021 17:22:47 +0000 (12:22 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 2 Jul 2021 23:35:25 +0000 (18:35 -0500)
commit0a25e49bcdb9c41fe6eb04b961fba2c197c68caa
treed6d98ec0bffb80fb128a4a0bfbe58e6151805dc4
parent01ecc76731d2b3b8e1976aef7f935da01a3eda50
cifs: make locking consistent around the server session status

There were three places where we were not taking the spinlock
around updates to server->tcpStatus when it was being modified.
To be consistent (also removes Coverity warning) and to remove
possibility of race best to lock all places where it is updated.
Two of the three were in initialization of the field and can't
race - but added lock around the other.

Addresses-Coverity: 1399512 ("Data race condition")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsglob.h
fs/cifs/connect.c
fs/cifs/transport.c