summaryrefslogtreecommitdiffstats
path: root/fs/smb/client/link.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2024-08-16 23:47:39 +0200
committerSteve French <stfrench@microsoft.com>2024-08-22 19:36:57 +0200
commit15179cf2806f91685410e598f82813a7fcf90f6c (patch)
tree0a7b022010bd6793946aaa8fd443aa226e6d4472 /fs/smb/client/link.c
parentsmb3: fix broken cached reads when posix locks (diff)
downloadlinux-15179cf2806f91685410e598f82813a7fcf90f6c.tar.xz
linux-15179cf2806f91685410e598f82813a7fcf90f6c.zip
smb3: fix problem unloading module due to leaked refcount on shutdown
The shutdown ioctl can leak a refcount on the tlink which can prevent rmmod (unloading the cifs.ko) module from working. Found while debugging xfstest generic/043 Fixes: 69ca1f57555f ("smb3: add dynamic tracepoints for shutdown ioctl") Reviewed-by: Meetakshi Setiya <msetiya@microsoft.com> Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/smb/client/link.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/link.c b/fs/smb/client/link.c
index d86da949a919..80099bbb333b 100644
--- a/fs/smb/client/link.c
+++ b/fs/smb/client/link.c
@@ -588,6 +588,7 @@ cifs_symlink(struct mnt_idmap *idmap, struct inode *inode,
tlink = cifs_sb_tlink(cifs_sb);
if (IS_ERR(tlink)) {
rc = PTR_ERR(tlink);
+ /* BB could be clearer if skipped put_tlink on error here, but harmless */
goto symlink_exit;
}
pTcon = tlink_tcon(tlink);