This is a note to let you know that I've just added the patch titled scsi: mpt3sas: Block PCI config access from userspace during reset to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: scsi-mpt3sas-block-pci-config-access-from-userspace-during-reset.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3c8604691d2acc7b7d4795d9695070de9eaa5828 Mon Sep 17 00:00:00 2001 From: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> Date: Tue, 30 Mar 2021 16:21:37 +0530 Subject: scsi: mpt3sas: Block PCI config access from userspace during reset From: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> commit 3c8604691d2acc7b7d4795d9695070de9eaa5828 upstream. While diag reset is in progress there is short duration where all access to controller's PCI config space from the host needs to be blocked. This is due to a hardware limitation of the IOC controllers. Block all access to controller's config space from userland applications by calling pci_cfg_access_lock() while diag reset is in progress and unlocking it again after the controller comes back to ready state. Link: https://lore.kernel.org/r/20210330105137.20728-1-sreekanth.reddy@xxxxxxxxxxxx Cc: stable@xxxxxxxxxxxxxxx #v5.4.108+ Signed-off-by: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -7235,6 +7235,8 @@ _base_diag_reset(struct MPT3SAS_ADAPTER ioc_info(ioc, "sending diag reset !!\n"); + pci_cfg_access_lock(ioc->pdev); + drsprintk(ioc, ioc_info(ioc, "clear interrupts\n")); count = 0; @@ -7325,10 +7327,12 @@ _base_diag_reset(struct MPT3SAS_ADAPTER goto out; } + pci_cfg_access_unlock(ioc->pdev); ioc_info(ioc, "diag reset: SUCCESS\n"); return 0; out: + pci_cfg_access_unlock(ioc->pdev); ioc_err(ioc, "diag reset: FAILED\n"); return -EFAULT; } Patches currently in stable-queue which might be from sreekanth.reddy@xxxxxxxxxxxx are queue-5.11/scsi-mpt3sas-block-pci-config-access-from-userspace-during-reset.patch queue-5.11/scsi-mpt3sas-only-one-vses-is-present-even-when-ioc-has-multi-vses.patch