All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: "Mohamed Abuelfotoh, Hazem" <abuehaze@amazon.com>,
	"pc@manguebit.com" <pc@manguebit.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"leonardo@schenkel.net" <leonardo@schenkel.net>,
	"linux-cifs@vger.kernel.org" <linux-cifs@vger.kernel.org>,
	"m.weissbach@info-gate.de" <m.weissbach@info-gate.de>,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>,
	"sairon@sairon.cz" <sairon@sairon.cz>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Shyam Prasad N <nspmangalore@gmail.com>,
	Darren Kenny <darren.kenny@oracle.com>,
	Ramanan Govindarajan <ramanan.govindarajan@oracle.com>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	david.flynn@oracle.com
Subject: Re: [REGRESSION 6.1.70] system calls with CIFS mounts failing with "Resource temporarily unavailable"
Date: Tue, 16 Jan 2024 15:53:22 +0530	[thread overview]
Message-ID: <09738f0f-53a2-43f1-a09d-a2bef48e1344@oracle.com> (raw)
In-Reply-To: <53F11617-D406-47C6-8CA7-5BE26EB042BE@amazon.com>

Hi,

On 15/01/24 7:52 pm, Mohamed Abuelfotoh, Hazem wrote:
> 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
> 

I think we are also seeing the same error on running xfstests with cifs.

[root@vm xfstests-dev]# ./check -g quick -s smb3
TEST_DEV=//<SERVER_IP>/TEST is mounted but not a type cifs filesystem

This is with 5.15.147 stable kernel.

I started seeing this since 5.15.146 and on bisection it points to the 
same commit:

commit bfd18c0f570e ("smb: client: fix OOB in SMB2_query_info_init()"), 
reverting that commit fixed the issue and also when I applied the below 
diff provided in this thread, the tests run fine.

[root@vm xfstests-dev]# ./check -g quick -s smb3 cifs/001
SECTION       -- smb3
FSTYP         -- cifs
PLATFORM      -- Linux/x86_64 vm 5.15.147-master.el9.v5.x86_64 #1 SMP 
Mon Jan 15 22:39:33 PST 2024
MKFS_OPTIONS  -- //<SERVER_IP>/SCRATCH
MOUNT_OPTIONS -- 
-ousername=root,password=PASSWORD,noperm,mfsymlinks,actimeo=0 
//<SERVER_IP>/SCRATCH /mnt/scratch

cifs/001 1s ...  1s
generic/001 16s ...

Thanks,
Harshit

> 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


  parent reply	other threads:[~2024-01-16 10:23 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 14:22 [REGRESSION 6.1.70] system calls with CIFS mounts failing with "Resource temporarily unavailable" 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2024-01-08 10:44 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09738f0f-53a2-43f1-a09d-a2bef48e1344@oracle.com \
    --to=harshit.m.mogalapalli@oracle.com \
    --cc=abuehaze@amazon.com \
    --cc=darren.kenny@oracle.com \
    --cc=david.flynn@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=leonardo@schenkel.net \
    --cc=linux-cifs@vger.kernel.org \
    --cc=m.weissbach@info-gate.de \
    --cc=nspmangalore@gmail.com \
    --cc=pc@manguebit.com \
    --cc=ramanan.govindarajan@oracle.com \
    --cc=regressions@lists.linux.dev \
    --cc=sairon@sairon.cz \
    --cc=stable@vger.kernel.org \
    --cc=vegard.nossum@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.