cifs: fix leak of iface for primary channel
authorShyam Prasad N <sprasad@microsoft.com>
Tue, 14 Nov 2023 04:54:12 +0000 (04:54 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 14 Nov 2023 17:38:00 +0000 (11:38 -0600)
commit29954d5b1e0d67a4cd61c30c2201030c97e94b1e
tree18dbe7c705e9b379a08dfa078295cd28a24df03e
parent181724fc72486dec2bec8803459be05b5162aaa8
cifs: fix leak of iface for primary channel

My last change in this area introduced a change which
accounted for primary channel in the interface ref count.
However, it did not reduce this ref count on deallocation
of the primary channel. i.e. during umount.

Fixing this leak here, by dropping this ref count for
primary channel while freeing up the session.

Fixes: fa1d0508bdd4 ("cifs: account for primary channel in the interface list")
Cc: stable@vger.kernel.org
Reported-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/connect.c