Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Colin Ian King" <colin.i.king@gmail.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH][next] scsi: ibmvfc: Fix spelling mistake "Deleteing" -> "Deleting"
Date: Thu, 30 Jul 2026 22:37:56 +0000	[thread overview]
Message-ID: <20260730223757.4D6571F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730222951.352872-1-colin.i.king@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Uninitialized stack variable `rport` is evaluated in the NVMe target deletion loop, leading to indeterminate execution behavior and skipped target logout/deletion.
--

--- Patch [1]: [PATCH][next] scsi: ibmvfc: Fix spelling mistake "Deleteing" -> "Deleting" ---
commit 815533f3bf155a641d39add28605656b69fb9ce0
Author: Colin Ian King <colin.i.king@gmail.com>

scsi: ibmvfc: Fix spelling mistake "Deleteing" -> "Deleting"

This commit fixes a spelling mistake in a tgt_dbg message during NVMe rport
deletion.

> diff --git a/drivers/scsi/ibmvscsi/ibmvfc-core.c b/drivers/scsi/ibmvscsi/ibmvfc-core.c
> --- a/drivers/scsi/ibmvscsi/ibmvfc-core.c
> +++ b/drivers/scsi/ibmvscsi/ibmvfc-core.c

[ ... ]

> @@ -6141,7 +6141,7 @@ static void ibmvfc_do_work(struct ibmvfc_host *vhost)
>  
>  		list_for_each_entry(tgt, &vhost->nvme_scrqs.targets, queue) {
>  			if (tgt->action == IBMVFC_TGT_ACTION_DEL_RPORT) {
> -				tgt_dbg(tgt, "Deleteing NVMe rport\n");
> +				tgt_dbg(tgt, "Deleting NVMe rport\n");
>  				nvme_rport = tgt->nvme_remote_port;
>  				list_del(&tgt->queue);
>  				ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_DELETED_RPORT);
>  				spin_unlock_irqrestore(vhost->host->host_lock, flags);
>  				if (nvme_rport)
>  					ibmvfc_nvme_unregister_remoteport(tgt);
>  				timer_delete_sync(&tgt->timer);
>  				kref_put(&tgt->kref, ibmvfc_release_tgt);
>  				return;
>  			} else if (rport && tgt->action == IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT) {

[Severity: High]
This isn't a bug introduced by this patch, but is it possible that rport is
uninitialized when evaluated here?

Looking at ibmvfc_do_work(), rport is declared as a stack variable:

static void ibmvfc_do_work(struct ibmvfc_host *vhost)
{
    ...
    struct fc_rport *rport;
    ...

If no SCSI targets match the deletion criteria in the earlier loop during
IBMVFC_HOST_ACTION_TGT_DEL, rport appears to remain completely uninitialized.

When the code later reaches the NVMe loop shown above and encounters a target
with IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT, it evaluates rport in the
condition.

Could this uninitialized memory evaluation cause the target deletion to be
silently skipped if it evaluates to 0, leaving the NVMe target in the
IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT state forever?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260730222951.352872-1-colin.i.king@gmail.com?part=1

  reply	other threads:[~2026-07-30 22:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 22:29 [PATCH][next] scsi: ibmvfc: Fix spelling mistake "Deleteing" -> "Deleting" Colin Ian King
2026-07-30 22:37 ` sashiko-bot [this message]
2026-07-30 22:54 ` Tyrel Datwyler

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=20260730223757.4D6571F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --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