]> 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)
commitd4580caf1a8a08c5a67cecfc935293d39ef8646a
treed6d98ec0bffb80fb128a4a0bfbe58e6151805dc4
parent8a6370ea50d293d32a16253fd320f7130f9176ef
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