mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [REGRESSION] in Linux 7.0: empty CIFS mount point with vers=1.0
@ 2026-04-16 21:20 Kris Karas (Bug Reporting)
  2026-04-16 22:39 ` Paulo Alcantara
  0 siblings, 1 reply; 3+ messages in thread
From: Kris Karas (Bug Reporting) @ 2026-04-16 21:20 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Paulo Alcantara, Linux Cifs

A bit late to the party, sorry, I should have reported this in 7.0-rcX.

When mounting a CIFS share with vers=1.0, the mount "succeeds" (is added 
to /proc/mounts) but the mountpoint is completely empty.  Even "." and 
".." are missing.  Blindly accessing a known file results in "no such 
file or directory".

Kernels 6.19 and below are not affected.  Using vers=2.0 or vers=3.1.1 
(etc) works fine, but "UNIX File Extensions" is still necessary for my 
workload.  (While "posix" extensions in vers=3.1.1 against Samba Stable 
is getting better, it's not there yet, details on request.)

Example:
     # ls -al /mnt/tmp
     Total 8
     drwxr-xr-x  2 root root 4096 Sep 25  2006 ./
     drwxr-xr-x 12 root root 4096 Apr 11 03:32 ../
     ----------  1 root root    0 Dec 22  2018 filesystem.not.mounted
     # mount -t cifs -o vers=1.0,cred=.creds //Server/Share /mnt/tmp
     # ls -al /mnt/tmp
     Total 0
     #

If Greg KH were reading this, I just know he'd say,
"can you bisect?"  :-)  OK, the winner of the bisect is:

> 4fc3a433c13944ee5766ec5b9bf6f1eb4d29b880 is the first bad commit
> commit 4fc3a433c13944ee5766ec5b9bf6f1eb4d29b880
> Author: Paulo Alcantara <pc@manguebit.org>
> Date:   Mon Feb 23 13:34:35 2026 -0300
> 
>     smb: client: use atomic_t for mnt_cifs_flags
>     
>     Use atomic_t for cifs_sb_info::mnt_cifs_flags as it's currently
>     accessed locklessly and may be changed concurrently in mount/remount
>     and reconnect paths.

I added Paulo to the CC's.

Kris

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [REGRESSION] in Linux 7.0: empty CIFS mount point with vers=1.0
  2026-04-16 21:20 [REGRESSION] in Linux 7.0: empty CIFS mount point with vers=1.0 Kris Karas (Bug Reporting)
@ 2026-04-16 22:39 ` Paulo Alcantara
  2026-04-17  0:51   ` Kris Karas (Bug Reporting)
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo Alcantara @ 2026-04-16 22:39 UTC (permalink / raw)
  To: Kris Karas (Bug Reporting), Linux Kernel Mailing List; +Cc: Linux Cifs

"Kris Karas (Bug Reporting)" <bugs-a21@moonlit-rail.com> writes:

> A bit late to the party, sorry, I should have reported this in 7.0-rcX.
>
> When mounting a CIFS share with vers=1.0, the mount "succeeds" (is added 
> to /proc/mounts) but the mountpoint is completely empty.  Even "." and 
> ".." are missing.  Blindly accessing a known file results in "no such 
> file or directory".

Thanks for the report.

Does the following fix your issue

diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index 69b38f0ccf2b..7a4249628ac4 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -3628,6 +3628,7 @@ int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx)
 		sbflags |= CIFS_MOUNT_POSIX_PATHS;
 		sbflags &= ~(CIFS_MOUNT_MAP_SFM_CHR |
 			     CIFS_MOUNT_MAP_SPECIAL_CHR);
+		atomic_set(&cifs_sb->mnt_cifs_flags, sbflags);
 	}
 
 #ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
@@ -3652,6 +3653,7 @@ int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx)
 		tcon->unix_ext = 0; /* server does not support them */
 
 	/* do not care if a following call succeed - informational */
+	sbflags = cifs_sb_flags(cifs_sb);
 	if (!tcon->pipe && server->ops->qfs_tcon) {
 		server->ops->qfs_tcon(mnt_ctx->xid, tcon, cifs_sb);
 		if (sbflags & CIFS_MOUNT_RO_CACHE) {
@@ -3675,7 +3677,6 @@ int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx)
 
 out:
 	mnt_ctx->tcon = tcon;
-	atomic_set(&cifs_sb->mnt_cifs_flags, sbflags);
 	return rc;
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [REGRESSION] in Linux 7.0: empty CIFS mount point with vers=1.0
  2026-04-16 22:39 ` Paulo Alcantara
@ 2026-04-17  0:51   ` Kris Karas (Bug Reporting)
  0 siblings, 0 replies; 3+ messages in thread
From: Kris Karas (Bug Reporting) @ 2026-04-17  0:51 UTC (permalink / raw)
  To: Paulo Alcantara, Linux Kernel Mailing List; +Cc: Linux Cifs

Paulo Alcantara wrote:
> "Kris Karas (Bug Reporting)" <bugs-a21@moonlit-rail.com> writes:
>> When mounting a CIFS share with vers=1.0, the mount "succeeds" (is added
>> to /proc/mounts) but the mountpoint is completely empty.
> 
> Thanks for the report.
> 
> Does the following fix your issue
> 
> diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c

Yes, tested.  This fix works fine for me.

Thanks, Paulo

Kris


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-17  0:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-16 21:20 [REGRESSION] in Linux 7.0: empty CIFS mount point with vers=1.0 Kris Karas (Bug Reporting)
2026-04-16 22:39 ` Paulo Alcantara
2026-04-17  0:51   ` Kris Karas (Bug Reporting)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®