From: Yuchan Nam <entropy1110@gmail.com>
To: stable@vger.kernel.org
Cc: sashal@kernel.org, sprasad@microsoft.com, stfrench@microsoft.com,
linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
Yuchan Nam <entropy1110@gmail.com>
Subject: [PATCH 6.6.y] cifs: some missing initializations on replay
Date: Sun, 1 Mar 2026 11:43:08 +0900 [thread overview]
Message-ID: <20260301024308.80078-1-entropy1110@gmail.com> (raw)
In-Reply-To: <20260301013911.1700044-1-sashal@kernel.org>
From: Shyam Prasad N <sprasad@microsoft.com>
[ Upstream commit 14f66f44646333d2bfd7ece36585874fd72f8286 ]
In several places in the code, we have a label to signify
the start of the code where a request can be replayed if
necessary. However, some of these places were missing the
necessary reinitializations of certain local variables
before replay.
This change makes sure that these variables get initialized
after the label.
Cc: stable@vger.kernel.org
Reported-by: Yuchan Nam <entropy1110@gmail.com>
Tested-by: Yuchan Nam <entropy1110@gmail.com>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Yuchan Nam <entropy1110@gmail.com>
---
fs/smb/client/smb2ops.c | 2 ++
fs/smb/client/smb2pdu.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index 138b3ed..4239b68 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -1147,6 +1147,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
replay_again:
/* reinitialize for possible replay */
+ used_len = 0;
flags = CIFS_CP_CREATE_CLOSE_OP;
oplock = SMB2_OPLOCK_LEVEL_NONE;
server = cifs_pick_channel(ses);
@@ -1545,6 +1546,7 @@ smb2_ioctl_query_info(const unsigned int xid,
replay_again:
/* reinitialize for possible replay */
+ buffer = NULL;
flags = CIFS_CP_CREATE_CLOSE_OP;
oplock = SMB2_OPLOCK_LEVEL_NONE;
server = cifs_pick_channel(ses);
diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
index a8890ae..595f043 100644
--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@ -2850,6 +2850,7 @@ int smb311_posix_mkdir(const unsigned int xid, struct inode *inode,
replay_again:
/* reinitialize for possible replay */
+ pc_buf = NULL;
flags = 0;
n_iov = 2;
server = cifs_pick_channel(ses);
--
2.43.0
prev parent reply other threads:[~2026-03-01 2:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-01 1:39 FAILED: Patch "cifs: some missing initializations on replay" failed to apply to 6.6-stable tree Sasha Levin
2026-03-01 2:43 ` Yuchan Nam [this message]
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=20260301024308.80078-1-entropy1110@gmail.com \
--to=entropy1110@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=sashal@kernel.org \
--cc=sprasad@microsoft.com \
--cc=stable@vger.kernel.org \
--cc=stfrench@microsoft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox