]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: protect session channel fields with chan_lock
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 19 Jul 2021 10:54:46 +0000 (10:54 +0000)
committerSteve French <stfrench@microsoft.com>
Fri, 12 Nov 2021 22:22:20 +0000 (16:22 -0600)
commit2daafd8cba15d4b42a9c146f7f56f8de4fe0880c
tree59f14fbd73adcbb3b89fc822d24b99f47883ea67
parent20c5811a5422a897a88666006b3bdc3a91c32083
cifs: protect session channel fields with chan_lock

Introducing a new spin lock to protect all the channel related
fields in a cifs_ses struct. This lock should be taken
whenever dealing with the channel fields, and should be held
only for very short intervals which will not sleep.

Currently, all channel related fields in cifs_ses structure
are protected by session_mutex. However, this mutex is held for
long periods (sometimes while waiting for a reply from server).
This makes the codepath quite tricky to change.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifs_debug.c
fs/cifs/cifsglob.h
fs/cifs/connect.c
fs/cifs/misc.c
fs/cifs/sess.c
fs/cifs/transport.c