]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:04:29 +0000 (14:04 +0100)
commit790282abe9d805f08618c1c24ea2529e7259b692
treee6ed7a541c2fef9fe30cd1acea21ab159fa6a5dc
parent8e6e2188d949ddc4d8f613fd115ac7177f7e3b2b
smb: client: Fix refcount leak for cifs_sb_tlink

commit c2b77f42205ef485a647f62082c442c1cd69d3fc upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/inode.c
fs/smb/client/smb2ops.c