From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Wentao Liang <vulab@iscas.ac.cn>, John Garry <john.garry@linux.dev>
Cc: "Martin K.Petersen" <martin.petersen@oracle.com>,
Jason Yan <yanaijie@huawei.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] scsi: libsas: Fix use-after-free in sas_eh_handle_resets()
Date: Sat, 07 Nov 2026 11:16:42 -0500 [thread overview]
Message-ID: <22c5ee29302b8deac001fec78942eae91ead557b.camel@HansenPartnership.com> (raw)
In-Reply-To: <20261107145323.314159-1-vulab@iscas.ac.cn>
On Sat, 2026-11-07 at 14:53 +0000, Wentao Liang wrote:
> sas_eh_handle_resets() drops the reference it took on the domain
> device with sas_put_device() and then accesses dev->state again while
> holding ha->lock. The put may release the last reference, so the
> clear_bit() can touch freed memory.
>
> Clear the pending flag before dropping the reference.
>
> The candidate was found with static analysis tools; DeepSeek and GPT-
> 6.1 Sol were used to audit it and to help prepare this fix.
>
> Fixes: 5db45bdc87ce ("[SCSI] libsas: enforce eh strategy handlers
> only in eh context")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
You just adopted the patch John sent wholesale, so the signoff above is
now wrong and you either need his signoff or at least a Co-developed-
by.
I get that this change is likely too small to have copyright
implications, but you want to make sure your process works in cases
where it does matter.
Regards,
James
prev parent reply other threads:[~2026-11-07 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 14:39 [PATCH] " Wentao Liang
2026-09-21 11:43 ` John Garry
2026-11-07 14:53 ` [PATCH v2] " Wentao Liang
2026-11-07 16:16 ` James Bottomley [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=22c5ee29302b8deac001fec78942eae91ead557b.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=john.garry@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
--cc=yanaijie@huawei.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®