From: Markus Elfring <Markus.Elfring@web.de>
To: Chengfeng Ye <dg573847474@gmail.com>,
linux-scsi@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com,
James Bottomley <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Sathya Prakash <sathya.prakash@broadcom.com>,
Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: mpt3sas: Fix use-after-free race in event log access
Date: Sun, 18 Jan 2026 07:05:07 +0100 [thread overview]
Message-ID: <fba6aaf6-3487-426c-bc57-618c30644c18@web.de> (raw)
In-Reply-To: <20260118053050.313222-1-dg573847474@gmail.com>
…
> Fix by setting ioc->remove_host while holding pci_access_mutex. This
> ensures the ioctl path either completes before removal starts, or sees
> the flag and returns -EAGAIN.
How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
…
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -11264,7 +11264,10 @@ static void scsih_remove(struct pci_dev *pdev)
> if (_scsih_get_shost_and_ioc(pdev, &shost, &ioc))
> return;
>
> + /* Set remove_host flag under pci_access_mutex to synchronize with ioctl path */
> + mutex_lock(&ioc->pci_access_mutex);
> ioc->remove_host = 1;
> + mutex_unlock(&ioc->pci_access_mutex);
Would it become feasible to apply a scoped_guard() call?
https://elixir.bootlin.com/linux/v6.19-rc5/source/include/linux/mutex.h#L253
>
> if (!pci_device_is_present(pdev)) {
> mpt3sas_base_pause_mq_polling(ioc);
Regards,
Markus
next prev parent reply other threads:[~2026-01-18 6:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 5:30 Chengfeng Ye
2026-01-18 6:05 ` Markus Elfring [this message]
2026-01-18 7:04 ` Chengfeng Ye
2026-01-18 8:02 ` Markus Elfring
2026-01-18 8:26 ` Chengfeng Ye
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=fba6aaf6-3487-426c-bc57-618c30644c18@web.de \
--to=markus.elfring@web.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=dg573847474@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@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®