]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: mpt3sas: Block PCI config access from userspace during reset
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Tue, 30 Mar 2021 10:51:37 +0000 (16:21 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 6 Apr 2021 03:32:43 +0000 (23:32 -0400)
commit6693f14751b34d8495bdf718c3ac75613b4066f2
tree04f031c1031a1d8f936928bb5f152b1ad6be202d
parent7621001f7924c54804f0c3d2898a4e16586e0e02
scsi: mpt3sas: Block PCI config access from userspace during reset

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@broadcom.com
Cc: stable@vger.kernel.org #v5.4.108+
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c