linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] PCI: s390: Fix user-after-free and clean up
@ 2023-03-06 15:10 Niklas Schnelle
  2023-03-06 15:10 ` [PATCH v2 1/4] PCI: s390: Fix use-after-free of PCI resources with per-function hotplug Niklas Schnelle
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Niklas Schnelle @ 2023-03-06 15:10 UTC (permalink / raw)
  To: Bjorn Helgaas, Lukas Wunner
  Cc: Gerd Bayer, Matthew Rosato, linux-s390, linux-kernel, linux-pci

Hi Bjorn, Hi Lukas,

This is v2 of my fix for a use-after-free of PCI MMIO resources in the
s390 PCI layer. As Bjorn found some redundant pci_bus_add_device() uses
and function zero special treatment I've added 3 cleanup patches in
addition to the fix itself. These are independent but in my opinion make
it easier to see the struct zpci_dev interactions with the common PCI
code. If you prefer I can of course split them off. As discussed this
version still uses the pci_rescan_remove lock to allow backporting but
I'll be looking into adding a more specific resource lock as a follow up.

Thanks,
Niklas

Changes since v1:
- Added clean up patches inspired by Bjorn's questions
- Removed return at end of function returning void

Niklas Schnelle (4):
  PCI: s390: Fix use-after-free of PCI resources with per-function
    hotplug
  s390/pci: only add specific device in zpci_bus_scan_device()
  s390/pci: remove redundant pci_bus_add_devices() on new bus
  s390/pci: clean up left over special treatment for function zero

 arch/s390/pci/pci.c     | 39 +++++++++++++--------------------------
 arch/s390/pci/pci_bus.c | 16 ++++++----------
 arch/s390/pci/pci_bus.h |  3 +--
 drivers/pci/bus.c       | 21 +++++++++++++++++++++
 include/linux/pci.h     |  1 +
 5 files changed, 42 insertions(+), 38 deletions(-)

-- 
2.37.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-04-17 10:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-06 15:10 [PATCH v2 0/4] PCI: s390: Fix user-after-free and clean up Niklas Schnelle
2023-03-06 15:10 ` [PATCH v2 1/4] PCI: s390: Fix use-after-free of PCI resources with per-function hotplug Niklas Schnelle
2023-03-08 23:14   ` Bjorn Helgaas
2023-03-09 16:39     ` Niklas Schnelle
2023-03-10 10:29     ` Vasily Gorbik
2023-03-09 18:18   ` Matthew Rosato
2023-04-17  7:46   ` Lukas Wunner
2023-04-17 10:07     ` Andy Shevchenko
2023-03-06 15:10 ` [PATCH v2 2/4] s390/pci: only add specific device in zpci_bus_scan_device() Niklas Schnelle
2023-03-09 18:36   ` Matthew Rosato
2023-03-06 15:10 ` [PATCH v2 3/4] s390/pci: remove redundant pci_bus_add_devices() on new bus Niklas Schnelle
2023-03-09 19:14   ` Matthew Rosato
2023-03-06 15:10 ` [PATCH v2 4/4] s390/pci: clean up left over special treatment for function zero Niklas Schnelle
2023-03-09 18:37   ` Matthew Rosato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).