From: sashiko-bot@kernel.org
To: "Nayeon Kim" <nayeoni.kim@samsung.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: rpmb: Return -EIO instead of SCSI result on failure
Date: Tue, 24 Nov 2026 04:56:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-230532@kernel.org> (raw)
In-Reply-To: <20261124-b4-ufs-3-rpmb-errno-v1-1-65b54643ca21@samsung.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] scsi: ufs: rpmb: missing Fixes trailer for return value fix in
ufs_sec_submit()
--
commit 04d79d2b7f15b664ba1b55919c7db6dc6388376b
Author: Nayeon Kim <nayeoni.kim@samsung.com>
> scsi: ufs: rpmb: Return -EIO instead of SCSI result on failure
>
> rpmb_route_frames() is documented to return a negative errno on
> failure, but ufs_sec_submit() returns the value of scsi_execute_cmd()
> as is. When a SECURITY PROTOCOL IN/OUT command fails, that value is a
> positive SCSI result such as SAM_STAT_CHECK_CONDITION or
> DID_ERROR << 16. ufs_rpmb_route_frames() passes it up and logs it as
> "ret=%d". Since scsi_execute_cmd() sets RQF_QUIET, the sense data is
> not logged anywhere.
>
> handle_rpc_func_rpmb_frames(), the only caller of rpmb_route_frames(),
> checks for a non-zero return, so OP-TEE still sees the failure.
>
> Log the SCSI result and sense data in ufs_sec_submit() and convert
> positive results to -EIO, as ufshcd_set_dev_pwr_mode() does.
>
> Signed-off-by: Nayeon Kim <nayeoni.kim@samsung.com>
[Severity: Low]
This fixes the return value contract of ufs_sec_submit(). Should it
include a Fixes tag:
Fixes: b06b8c421485 ("scsi: ufs: core: Add OP-TEE based RPMB driver for UFS devices")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124-b4-ufs-3-rpmb-errno-v1-1-65b54643ca21@samsung.com?part=1
prev parent reply other threads:[~2026-11-24 4:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 4:52 [PATCH] scsi: ufs: rpmb: Return -EIO instead of SCSI result on failure Nayeon Kim via B4 Relay
2026-11-24 4:56 ` sashiko-bot [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=sashiko-outbox-230532@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nayeoni.kim@samsung.com \
--cc=sashiko-reviews@lists.linux.dev \
/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