FAILED: patch "[PATCH] ksmbd: fix error code overwriting in" failed to apply to 5.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 88daf2f448aad05a2e6df738d66fe8b0cf85cee0
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025101324-echo-cardinal-3043@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 88daf2f448aad05a2e6df738d66fe8b0cf85cee0 Mon Sep 17 00:00:00 2001
From: Matvey Kovalev <[email protected]>
Date: Thu, 25 Sep 2025 15:12:34 +0300
Subject: [PATCH] ksmbd: fix error code overwriting in
smb2_get_info_filesystem()
If client doesn't negotiate with SMB3.1.1 POSIX Extensions, then proper error code won't be returned due to overwriting.
Return error immediately.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
fs/smb/server/smb2pdu.c +2 -1
@@ -5629,7 +5629,8 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,if (!work->tcon->posix_extensions) {pr_err ("client doesn't negotiate with SMB3.1.1 POSIX Extensions\n" ); - rc = -EOPNOTSUPP ; +path_put (&path); +return -EOPNOTSUPP ; }else { info = (struct filesystem_posix_info *)(rsp->Buffer); info->OptimalTransferSize =cpu_to_le32 (stfs.f_bsize);
Sasha Levin
maintainerPATCH 1/1 ksmbd: fix error code overwriting in smb2_get_info_filesystem()
From: Matvey Kovalev <[email protected]>
[ Upstream commit 88daf2f448aad05a2e6df738d66fe8b0cf85cee0 ]
If client doesn't negotiate with SMB3.1.1 POSIX Extensions, then proper error code won't be returned due to overwriting.
Return error immediately.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- fs/ksmbd/smb2pdu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ksmbd/smb2pdu.c +2 -1
@@ -5204,7 +5204,8 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,if (!work->tcon->posix_extensions) {pr_err ("client doesn't negotiate with SMB3.1.1 POSIX Extensions\n" ); - rc = -EOPNOTSUPP ; +path_put (&path); +return -EOPNOTSUPP ; }else { info = (struct filesystem_posix_info *)(rsp->Buffer); info->OptimalTransferSize =cpu_to_le32 (stfs.f_bsize);
Signature · 1 line
2.51.0