cifs: protect all accesses to chan_* with chan_lock
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 19 Nov 2021 14:16:57 +0000 (14:16 +0000)
committerSteve French <stfrench@microsoft.com>
Wed, 19 Jan 2022 17:10:54 +0000 (11:10 -0600)
commit88b024f556fcd5bf1288c6333016f576cfa5f539
tree26e936c19c55aa2484d3ae6c4c23e9fde3ff0d2d
parenta05885ce13bd5ec9602551e32dfb1a4f26bfa542
cifs: protect all accesses to chan_* with chan_lock

A spin lock called chan_lock was introduced recently.
But not all accesses were protected. Doing that with
this change.

To make sure that a channel is not freed when in use,
we need to introduce a ref count. But today, we don't
ever free channels.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/sess.c
fs/cifs/smb2pdu.c
fs/cifs/smb2transport.c
fs/cifs/transport.c