cifs: lock chan_lock outside match_session
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 20 Feb 2023 13:02:11 +0000 (13:02 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 1 Jun 2023 04:22:32 +0000 (23:22 -0500)
commit4cbe21e26341d883258ace753f6a484cf9dfe555
tree01151d39d2c090b0fc3309fc8a4462e74fb9878e
parentc47900c74d3d6d027b207db7316e3c954d7ee0ac
cifs: lock chan_lock outside match_session

Coverity had rightly indicated a possible deadlock
due to chan_lock being done inside match_session.
All callers of match_* functions should pick up the
necessary locks and call them.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Cc: stable@vger.kernel.org
Fixes: 724244cdb382 ("cifs: protect session channel fields with chan_lock")
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c