From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 160AA367872; Sat, 28 Feb 2026 17:46:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300785; cv=none; b=VAYEx9mikAg0LTQECJ/3VXtciNlS+gkXHHUkU77+xL2uwJQ98c+cNWOYhdRGsCsyMzIY3pHBpyDEx/4uXY/0J014K1bOGkPyYhT2Jkb2t7JKwzjePqb3cxP2P/N4dFiQukUbWAAGapi187Cosk8BuTrcpD0Zxb/hg8mhZ6Tz/WA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300785; c=relaxed/simple; bh=pENoBtgTFyKqD8hX45iHf3pkkGxcMuELQ5ruuB6O5cU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CJVDqkd9+h8qIgphzHC6/Ed+39jHRJelYTV901lK/IQ5ILoPa7MzK0iBBNiDr3vyDju94whV6Cs8PhI6y1SYbe40bLeY9a/adQ1mdElGMVqO0UN/C88QIXrbMB/3rAZRPKeMolvaWZE5vjURMcrh+Bqh1YQewwTxZSajYEExXGU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z3UbOTT/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z3UbOTT/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 023E9C19425; Sat, 28 Feb 2026 17:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300784; bh=pENoBtgTFyKqD8hX45iHf3pkkGxcMuELQ5ruuB6O5cU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z3UbOTT/L7j+H8Cgjv7HeXhhsAu+wOGcgkiNVVHmDO4aLYCUm6cLlzp+e3uPGm/B4 bfwKwCPlCmbcvZQT+nzBu0zzpzI+FRhKGQ0yo609l0XJoSklsJHGrWaFx0fTzgNbc/ 1VIi5WmxUpfcs18q0c8sheO5kVCUgLMBDg/8CM2lXyQeFU6aJy0eOgKm4rmtpi9VUX MPnfEWqwEE3NRyVBWfRGqIbN078zlYDkpG/E6t5xs3B5OGmpfPMNkhdYE4is3XhNKo zQ1Cwi7MNTvUEX/oQSARQ8xXAtB3TdxluQrOXQjpurVrUNEM07gJFVJeYg01lr3Fel DcX+NVY+CQbpg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Shyam Prasad N , Yuchan Nam , Steve French , Sasha Levin Subject: [PATCH 6.19 816/844] cifs: some missing initializations on replay Date: Sat, 28 Feb 2026 12:32:09 -0500 Message-ID: <20260228173244.1509663-817-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Shyam Prasad N [ 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 Tested-by: Yuchan Nam Signed-off-by: Shyam Prasad N Signed-off-by: Steve French Signed-off-by: Sasha Levin --- 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 d76d79e50e8e7..4eb7879479baf 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -1185,6 +1185,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); @@ -1583,6 +1584,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 c7e086dfb1765..758d6f4256726 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -2908,6 +2908,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.51.0