Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 's390-5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fix from Vasily Gorbik:

- fix use after free of zpci_dev in pci code

* tag 's390-5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/pci: fix use after free of zpci_dev

+11
+6
arch/s390/pci/pci.c
··· 560 560 561 561 int pcibios_add_device(struct pci_dev *pdev) 562 562 { 563 + struct zpci_dev *zdev = to_zpci(pdev); 563 564 struct resource *res; 564 565 int i; 565 566 567 + /* The pdev has a reference to the zdev via its bus */ 568 + zpci_zdev_get(zdev); 566 569 if (pdev->is_physfn) 567 570 pdev->no_vf_scan = 1; 568 571 ··· 585 582 586 583 void pcibios_release_device(struct pci_dev *pdev) 587 584 { 585 + struct zpci_dev *zdev = to_zpci(pdev); 586 + 588 587 zpci_unmap_resources(pdev); 588 + zpci_zdev_put(zdev); 589 589 } 590 590 591 591 int pcibios_enable_device(struct pci_dev *pdev, int mask)
+5
arch/s390/pci/pci_bus.h
··· 22 22 kref_put(&zdev->kref, zpci_release_device); 23 23 } 24 24 25 + static inline void zpci_zdev_get(struct zpci_dev *zdev) 26 + { 27 + kref_get(&zdev->kref); 28 + } 29 + 25 30 int zpci_alloc_domain(int domain); 26 31 void zpci_free_domain(int domain); 27 32 int zpci_setup_bus_resources(struct zpci_dev *zdev,