]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb: client: fix dir separator in SMB1 UNIX mounts
authorPaulo Alcantara <pc@manguebit.org>
Fri, 17 Apr 2026 00:15:50 +0000 (21:15 -0300)
committerSteve French <stfrench@microsoft.com>
Fri, 17 Apr 2026 04:21:00 +0000 (23:21 -0500)
commitc4d3fc5844d685441befd0caaab648321013cdfd
tree1c4a3ba827280df460de142c2983193d30571d5c
parent0b2f2b1fc0c61e602a6babf580b91f895b0ea80a
smb: client: fix dir separator in SMB1 UNIX mounts

When calling cifs_mount_get_tcon() with SMB1 UNIX mounts,
@cifs_sb->mnt_cifs_flags needs to be read or updated only after
calling reset_cifs_unix_caps(), otherwise it might end up with missing
CIFS_MOUNT_POSIXACL and CIFS_MOUNT_POSIX_PATHS bits.

This fixes the wrong dir separator used in paths caused by the missing
CIFS_MOUNT_POSIX_PATHS bit in cifs_sb_info::mnt_cifs_flags.

Reported-by: "Kris Karas (Bug Reporting)" <bugs-a21@moonlit-rail.com>
Closes: https://lore.kernel.org/r/f758f4ff-4d54-4244-931d-38f469c3ff14@moonlit-rail.com
Fixes: 4fc3a433c139 ("smb: client: use atomic_t for mnt_cifs_flags")
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Cc: David Howells <dhowells@redhat.com>
Cc: linux-cifs@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/connect.c
fs/smb/client/smb1ops.c