From: Christoph Hellwig <hch@lst.de>
To: Alexandr Sapozhnkiov <alsp705@gmail.com>
Cc: James Smart <james.smart@broadcom.com>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org, Daniel Wagner <wagi@kernel.org>
Subject: Re: [PATCH] nvme: target: fix error checking in nvmet_fc_schedule_delete_assoc()
Date: Fri, 3 Oct 2025 12:13:54 +0200 [thread overview]
Message-ID: <20251003101354.GA15826@lst.de> (raw)
In-Reply-To: <20251002092202.11-1-alsp705@gmail.com>
Adding Daniel who has been touching this area recently.
On Thu, Oct 02, 2025 at 12:22:01PM +0300, Alexandr Sapozhnkiov wrote:
> From: Alexandr Sapozhnikov <alsp705@gmail.com>
>
> The nvmet_fc_tgtport_get() function may return an error.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Alexandr Sapozhnikov <alsp705@gmail.com>
> ---
> drivers/nvme/target/fc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
> index 337ee1cb09ae..68a416a92bfc 100644
> --- a/drivers/nvme/target/fc.c
> +++ b/drivers/nvme/target/fc.c
> @@ -1110,8 +1110,8 @@ nvmet_fc_delete_assoc_work(struct work_struct *work)
> static void
> nvmet_fc_schedule_delete_assoc(struct nvmet_fc_tgt_assoc *assoc)
> {
> - nvmet_fc_tgtport_get(assoc->tgtport);
> - queue_work(nvmet_wq, &assoc->del_work);
> + if (nvmet_fc_tgtport_get(assoc->tgtport))
> + queue_work(nvmet_wq, &assoc->del_work);
> }
>
> static bool
> --
> 2.43.0
---end quoted text---
next prev parent reply other threads:[~2025-10-03 10:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 9:22 [PATCH] nvme: target: fix error checking in nvmet_fc_schedule_delete_assoc() Alexandr Sapozhnkiov
2025-10-03 10:13 ` Christoph Hellwig [this message]
2025-10-06 12:44 ` Daniel Wagner
2025-10-03 13:25 ` Markus Elfring
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=20251003101354.GA15826@lst.de \
--to=hch@lst.de \
--cc=alsp705@gmail.com \
--cc=james.smart@broadcom.com \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=lvc-project@linuxtesting.org \
--cc=sagi@grimberg.me \
--cc=wagi@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).