stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [REGRESSION 6.1.70] system calls with CIFS mounts failing with "Resource temporarily unavailable"
@ 2024-01-08 10:44 Leonardo Brondani Schenkel
  2024-01-08 11:18 ` Jan Čermák
  0 siblings, 1 reply; 35+ messages in thread
From: Leonardo Brondani Schenkel @ 2024-01-08 10:44 UTC (permalink / raw)
  To: stable; +Cc: regressions

I'm new here, first time reporting a regression, apologies in advance if 
I'm doing something wrong of if this was already reported (I found some 
CIFS issues but not exactly this one).

I'm using x86-64 Arch Linux and LTS kernel (6.1.71 as I write this) and 
I noticed a regression that I could reproduce in other boxes with other 
architectures as well (aarch64 with 6.1.70).

# mount.cifs //server/share /mnt
# mount
//server/share on /mnt type cifs (rw,relatime,vers=3.1.1...)
# cd /mnt
# df .
df: .: Resource temporarily unavailable
# ls -al
ls: .: Resource temporarily unavailable
ls: file1: Resource temporarily unavailable
ls: file2: Resource temporarily unavailable
[...then ls shows the listing...]

If I use strace with df, the problem is:
statfs(".", 0x.....) = -1 EAGAIN (Resource temporarily unavailable)

And with ls:
listxattr(".", 0x..., 152): -1 EAGAIN (Resource temporarily unavailable)
listxattr("file1", ..., 152): -1 EAGAIN (same as above)
...

Initially I thought the problem was with the Samba server and/or the 
client mount flags, but I've spent a day trying a *lot* of different 
combinations and nothing worked. This happens with any share that I try, 
and I've tried mounting shares from multiple Linux boxes running 
different Samba and kernel versions.

Then I tried changing kernel versions at my client box. I booted latest 
6.6.9 and the problem simply disappeared. My Debian server with 6.5.11 
also doesn't have it. I then started a VM and tried a "bisection" of 
6.1.x versions, leading to kernel 6.1.70 when this started to happen.
6.1.69 and older look fine.

I hope that this is enough information to reproduce this issue. I will 
be glad to provide more info if necessary.

// Leonardo.

^ permalink raw reply	[flat|nested] 35+ messages in thread
* Re: [REGRESSION 6.1.70] system calls with CIFS mounts failing with "Resource temporarily unavailable"
@ 2024-01-15 14:22 Mohamed Abuelfotoh, Hazem
  2024-01-15 14:28 ` Mohamed Abuelfotoh, Hazem
                   ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Mohamed Abuelfotoh, Hazem @ 2024-01-15 14:22 UTC (permalink / raw)
  To: pc@manguebit.com
  Cc: gregkh@linuxfoundation.org, leonardo@schenkel.net,
	linux-cifs@vger.kernel.org, m.weissbach@info-gate.de,
	regressions@lists.linux.dev, sairon@sairon.cz,
	stable@vger.kernel.org

It looks like both 5.15.146 and 5.10.206 are impacted by this regression as they both have the
bad commit 33eae65c6f (smb: client: fix OOB in SMB2_query_info_init()). We tried to
apply the proposed fix eb3e28c1e89b ("smb3: Replace smb2pdu 1-element 
arrays with flex-arrays”) but there are a lot of dependencies required to do the backport.
Is it possible to consider the simple fix that Paulo proposed as a solution for 5.10 and 5.15.
We were lucky with 5.4 as it doesn’t have the bad commit because of merge conflict reported
in https://lore.kernel.org/all/2023122857-doubling-crazed-27f4@gregkh/T/#m3aa009c332999268f71361237ace6ded9110f0d0

diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
	index 05ff8a457a3d..aed5067661de 100644
	--- a/fs/smb/client/smb2pdu.c
	+++ b/fs/smb/client/smb2pdu.c
	@@ -3556,7 +3556,7 @@ SMB2_query_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
	 
	 	iov[0].iov_base = (char *)req;
	 	/* 1 for Buffer */
	-	iov[0].iov_len = len;
	+	iov[0].iov_len = len - 1;
	 	return 0;
	 }

Hazem

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

end of thread, other threads:[~2024-02-26 22:54 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-08 10:44 [REGRESSION 6.1.70] system calls with CIFS mounts failing with "Resource temporarily unavailable" Leonardo Brondani Schenkel
2024-01-08 11:18 ` Jan Čermák
2024-01-08 14:13   ` Greg KH
2024-01-08 14:30     ` Jan Čermák
2024-01-08 14:34     ` Leonardo Brondani Schenkel
2024-01-08 14:52   ` Paulo Alcantara
2024-01-08 15:11     ` Greg Kroah-Hartman
2024-01-08 15:58       ` Paulo Alcantara
2024-01-30 22:43         ` Salvatore Bonaccorso
2024-01-30 22:49           ` Salvatore Bonaccorso
2024-02-20 20:27             ` Greg Kroah-Hartman
2024-02-20 21:25               ` Salvatore Bonaccorso
2024-02-21 11:09                 ` Greg Kroah-Hartman
2024-02-22 23:00                   ` Paulo Alcantara
2024-02-23  5:50                     ` Salvatore Bonaccorso
  -- strict thread matches above, loose matches on Subject: below --
2024-01-15 14:22 Mohamed Abuelfotoh, Hazem
2024-01-15 14:28 ` Mohamed Abuelfotoh, Hazem
2024-01-15 15:16   ` gregkh
2024-01-15 15:30     ` Mohamed Abuelfotoh, Hazem
2024-01-31  6:30       ` Salvatore Bonaccorso
2024-01-31 17:19         ` Paulo Alcantara
2024-02-01 12:58           ` Mohamed Abuelfotoh, Hazem
2024-02-03 15:39             ` Salvatore Bonaccorso
2024-02-06  7:46               ` Harshit Mogalapalli
2024-02-06 16:33                 ` kovalev
2024-02-20 20:28                 ` gregkh
2024-02-21  2:26                   ` Harshit Mogalapalli
2024-02-21 11:09                     ` gregkh
2024-01-16 10:23 ` Harshit Mogalapalli
2024-01-26 19:13 ` SeongJae Park
2024-02-23  6:14   ` Linux regression tracking #update (Thorsten Leemhuis)
2024-02-26 14:28     ` Mohamed Abuelfotoh, Hazem
2024-02-26 14:54       ` Linux regression tracking (Thorsten Leemhuis)
2024-02-26 14:55       ` gregkh
2024-02-26 22:54         ` Mohamed Abuelfotoh, Hazem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).