From: sashiko-bot@kernel.org
To: "Kyle Mahlkuch" <kmahlkuc@linux.ibm.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v4] scsi: lpfc: Fix race conditions in ELS retry handling
Date: Wed, 11 Nov 2026 18:38:33 +0000 [thread overview]
Message-ID: <sashiko-outbox-209465@kernel.org> (raw)
In-Reply-To: <dcea48dd-f76c-4bb0-9275-c12ef9bd78a2@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] scsi: lpfc: missing Fixes trailer and stale race description in
changelog
--
commit c4e00459dde635d0b5ecc529a001464e7b80a848
Author: Kyle Mahlkuch <kmahlkuc@linux.ibm.com>
> scsi: lpfc: Fix race conditions in ELS retry handling
>
> This patch addresses a race condition in the lpfc driver's ELS retry
> event handling that can lead to a use-after-free in the
> lpfc_cancel_retry_delay_tmo(), where the NLP_DELAY_TMO flag is cleared
> before acquiring the lock to check if the retry event is queued. This
> creates a window where the timer can be rescheduled and fire, causing
> both the cancel path and the worker thread to release the same reference,
> resulting in a double-put and use-after-free.
>
> Moved capture ndlp and clear evt_arg1 under hbalock while dequeuing
> LPFC_EVT_ELS_RETRY in lpfc_work_list_done().
>
> Signed-off-by: Kyle Mahlkuch <kmahlkuc@linux.ibm.com>
[Severity: Low]
This fixes the unlocked els_retry_evt removal and lpfc_nlp_put() in
lpfc_cancel_retry_delay_tmo(). Should the commit message include:
Fixes: e47c9093531d ("[SCSI] lpfc 8.2.5 : Correct ndlp referencing issues")
Also, is the first paragraph of the commit message still accurate? The code
still clears NLP_DELAY_TMO and calls timer_delete_sync() before taking
phba->hbalock, and fixes the double-put race by serializing els_retry_evt
dequeue and evt_arg1 consumption under phba->hbalock.
--
Sashiko AI review · https://sashiko.dev/#/patchset/dcea48dd-f76c-4bb0-9275-c12ef9bd78a2@linux.ibm.com?part=1
next prev parent reply other threads:[~2026-11-11 18:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 17:47 [PATCH v4] scsi: lpfc: Fix race conditions in ELS retry handling Kyle Mahlkuch
2026-11-11 18:38 ` sashiko-bot [this message]
2026-11-12 12:34 ` Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2026-11-11 19:04 Paul Ely
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-209465@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kmahlkuc@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.