From: "Martin K. Petersen" <mkp@kernel.org>
To: Kyle Mahlkuch <kmahlkuc@linux.ibm.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Paul Ely <paul.ely@broadcom.com>,
hare@suse.de, msmurthy@linux.ibm.com
Subject: Re: [PATCH v2] scsi: lpfc: Fix race conditions in ELS retry
Date: Fri, 30 Oct 2026 21:31:47 -0400 [thread overview]
Message-ID: <yq15wyi3bf8.fsf@mail.kernel.org> (raw)
In-Reply-To: <29073ebc-b616-475b-bc05-384da09fbb54@linux.ibm.com>
Kyle,
> 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.
AI review commentary:
- **High:** the worker clears `evt_arg1` after unlocking, potentially
erasing a requeued event’s payload and causing a NULL dereference.
Capture and clear it under `hbalock` during dequeue.
- **Low:** missing Fixes tag for `e47c9093531d`.
The mailbox is also line-wrapped and fails `git apply --check`.
Please fix, thanks!
--
Martin K. Petersen
next prev parent reply other threads:[~2026-10-31 1:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 18:50 Kyle Mahlkuch
2026-10-31 1:31 ` Martin K. Petersen [this message]
2026-10-30 13:41 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=yq15wyi3bf8.fsf@mail.kernel.org \
--to=mkp@kernel.org \
--cc=hare@suse.de \
--cc=kmahlkuc@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=msmurthy@linux.ibm.com \
--cc=paul.ely@broadcom.com \
/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
all inboxes | Powered by JetHome®