Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2D18B54489F for ; Tue, 8 Sep 2026 12:55:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788872158; cv=none; b=DsdwhiaQ4WGuJXBXco4s1jD2x1KzTeJhkEfl59tlSuwbhcdFTmdxttY+moU2GO8YbCiEe+7yPgQVZO4M42M+uqJ2+Hlc3IbpG3lbNGpih5MtapYxxV35Z1n2MaRHHh+59BxKqNavGS1FfrCi8Xq5YwRJxOO6bMiOAkhM5/uS9oc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788872158; c=relaxed/simple; bh=OO7TBoBlx1MdHpgHxf6JO0fQ5ETcjmlt9teKNPPaZl8=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=DcI2eHuisAGD8C6k127nMpxYibyOmpYSvCyoKqy00QpzjVEQoovjotIsLF5fiSglhpJy17Wz2hfLyEW3zHDx5mNVLfTxmtAD+V4rG1EXpNjkl8ueWSamalRT6NM1r5/d3blcUPfbyROnEUgLGf0qoriyEnaEmgUlhkiEGsqih80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 658C91F00A3A; Tue, 8 Sep 2026 12:55:56 +0000 (UTC) Subject: FAILED: patch "[PATCH] scsi: sg: Report request-table problems when any status is" failed to apply to 5.15-stable tree To: raoxu@uniontech.com,bvanassche@acm.org,mkp@kernel.org Cc: From: Date: Tue, 08 Sep 2026 14:47:30 +0200 Message-ID: <2026090830-overpay-twentieth-8772@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The 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 . 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 11300f8ddee301dca9914561f24bea4168de076d # git commit -s git send-email --to '' --in-reply-to '2026090830-overpay-twentieth-8772@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From 11300f8ddee301dca9914561f24bea4168de076d Mon Sep 17 00:00:00 2001 From: Xu Rao Date: Mon, 6 Jul 2026 16:44:43 +0800 Subject: [PATCH] scsi: sg: Report request-table problems when any status is set SG_GET_REQUEST_TABLE reports per-request diagnostic state through sg_req_info::problem. The field is meant to indicate whether there is an error to report for a completed request. sg_fill_request_table() currently combines masked_status, host_status and driver_status with bitwise AND. This only reports a problem when all three status fields are non-zero at the same time. A normal target check condition, for example, has masked_status set while host_status and driver_status may both be zero, so the request is incorrectly reported as clean. Use the same condition as sg_new_read(), which sets SG_INFO_CHECK when any of the three status fields is non-zero. Signed-off-by: Xu Rao Reviewed-by: Bart Van Assche Cc: stable@vger.kernel.org Link: https://patch.msgid.link/26BF67F369E2123E+20260706084443.805598-1-raoxu@uniontech.com Signed-off-by: Martin K. Petersen (Oracle) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 74cd4e8a61c2..5408f002e6c0 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -863,10 +863,9 @@ sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) if (val >= SG_MAX_QUEUE) break; rinfo[val].req_state = srp->done + 1; - rinfo[val].problem = - srp->header.masked_status & - srp->header.host_status & - srp->header.driver_status; + rinfo[val].problem = srp->header.masked_status || + srp->header.host_status || + srp->header.driver_status; if (srp->done) rinfo[val].duration = srp->header.duration;