]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: hv: Fix synchronization between channel callback and hv_pci_bus_exit()
authorAndrea Parri (Microsoft) <parri.andrea@gmail.com>
Wed, 11 May 2022 22:32:07 +0000 (00:32 +0200)
committerWei Liu <wei.liu@kernel.org>
Fri, 13 May 2022 16:57:32 +0000 (16:57 +0000)
commit51038670be22f9e09c8bfa748dc819b48e51134e
treed71d5b64658c4c6314ace1bd460e68358eb4741e
parente36cc08bae3dc60e7b42f4c71233c707420c906b
PCI: hv: Fix synchronization between channel callback and hv_pci_bus_exit()

[ Similarly to commit 00bfb885686ed ("PCI: hv: Fix synchronization
  between channel callback and hv_compose_msi_msg()"): ]

The (on-stack) teardown packet becomes invalid once the completion
timeout in hv_pci_bus_exit() has expired and hv_pci_bus_exit() has
returned.  Prevent the channel callback from accessing the invalid
packet by removing the ID associated to such packet from the VMbus
requestor in hv_pci_bus_exit().

Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Link: https://lore.kernel.org/r/20220511223207.3386-3-parri.andrea@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/pci/controller/pci-hyperv.c