cifs: fix leak of iface for primary channel
authorSteve French <stfrench@microsoft.com>
Fri, 26 Jan 2024 16:42:16 +0000 (10:42 -0600)
committerSteve French <stfrench@microsoft.com>
Sat, 27 Jan 2024 06:17:57 +0000 (00:17 -0600)
commit4ff6e88a0441460b3d87e60fb8d771090b421221
treea14efca44246f1dfe035117b6ea4a381d8a77745
parent8c6e2a68bbf0985a8d4c39028c5be8d6d8b86156
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/cifs/connect.c