summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2025-04-06 14:09:19 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-20 10:23:01 +0200
commit19583d2ddc889b166e0fe6fa28656dfc3dbb83cf (patch)
tree5645cabf1d4138cd010833f9abebe5ed2cb8e5ed
parent4129760e462f45f14e61b10408ace61aa7c2ed30 (diff)
smb311 client: fix missing tcon check when mounting with linux/posix extensions
commit b365b9d404b7376c60c91cd079218bfef11b7822 upstream. When mounting the same share twice, once with the "linux" mount parameter (or equivalently "posix") and then once without (or e.g. with "nolinux"), we were incorrectly reusing the same tree connection for both mounts. This meant that the first mount of the share on the client, would cause subsequent mounts of that same share on the same client to ignore that mount parm ("linux" vs. "nolinux") and incorrectly reuse the same tcon. Cc: stable@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/smb/client/connect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index cb14a6828c50..2255edeca8c9 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -2455,6 +2455,8 @@ static int match_tcon(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
return 0;
if (tcon->nodelete != ctx->nodelete)
return 0;
+ if (tcon->posix_extensions != ctx->linux_ext)
+ return 0;
return 1;
}