FAILED: patch "[PATCH] scsi: ufs: bsg: Clear the reply buffer before use" failed to apply to 5.15-stable tree
Subsystems (3)
Sasha Levin
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 2e63ac76cc08ea376ba61fef52f7b7849e35024d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 2e63ac76cc08ea376ba61fef52f7b7849e35024d Mon Sep 17 00:00:00 2001
From: Stanley Jhu <[email protected]>
Date: Thu, 15 Oct 2026 08:18:52 +0800
Subject: [PATCH] scsi: ufs: bsg: Clear the reply buffer before use
The reply buffer is allocated once per tag and reused. Requests that complete with a positive status do not fill all of it, so user space receives bytes from an earlier request on the same tag.
Clear the whole reply buffer on entry to ufs_bsg_request().
--- drivers/ufs/core/ufs_bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/core/ufs_bsg.c +1 -1
@@ -140,7 +140,7 @@ static int ufs_bsg_request(struct bsg_job *job)int ret;bool rpmb = false; - bsg_reply->reply_payload_rcv_len =0 ; +memset (job->reply,0 , job->reply_len);ufshcd_rpm_get_sync (hba);
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/1 scsi: ufs: bsg: Clear the reply buffer before use
From: Stanley Jhu <[email protected]>
[ Upstream commit 2e63ac76cc08ea376ba61fef52f7b7849e35024d ]
The reply buffer is allocated once per tag and reused. Requests that complete with a positive status do not fill all of it, so user space receives bytes from an earlier request on the same tag.
Clear the whole reply buffer on entry to ufs_bsg_request().
--- drivers/scsi/ufs/ufs_bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/ufs_bsg.c +1 -1
@@ -95,7 +95,7 @@ static int ufs_bsg_request(struct bsg_job *job)if (ret) goto out; - bsg_reply->reply_payload_rcv_len =0 ; +memset (job->reply,0 , job->reply_len);ufshcd_rpm_get_sync (hba);
Signature · 1 line
2.53.0