]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb: client: Fix refcount leak for cifs_sb_tlink
authorShuhao Fu <sfual@cse.ust.hk>
Thu, 16 Oct 2025 02:52:55 +0000 (02:52 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Oct 2025 03:09:46 +0000 (22:09 -0500)
commitc2b77f42205ef485a647f62082c442c1cd69d3fc
tree64b1b8a60567368bbb49555615ff13ada1459615
parentd451a0e88e9fa710df33f8dd5dc7ca63e22ef211
smb: client: Fix refcount leak for cifs_sb_tlink

Fix three refcount inconsistency issues related to `cifs_sb_tlink`.

Comments for `cifs_sb_tlink` state that `cifs_put_tlink()` needs to be
called after successful calls to `cifs_sb_tlink()`. Three calls fail to
update refcount accordingly, leading to possible resource leaks.

Fixes: 8ceb98437946 ("CIFS: Move rename to ops struct")
Fixes: 2f1afe25997f ("cifs: Use smb 2 - 3 and cifsacl mount options getacl functions")
Fixes: 366ed846df60 ("cifs: Use smb 2 - 3 and cifsacl mount options setacl function")
Cc: stable@vger.kernel.org
Signed-off-by: Shuhao Fu <sfual@cse.ust.hk>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/inode.c
fs/smb/client/smb2ops.c