From: Greg Kroah-Hartman Date: Thu, 23 Aug 2018 11:55:26 +0000 (+0200) Subject: fix up 4.14 and 4.9 patch X-Git-Tag: v4.18.5~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0e8d62428c2d7be77d3e18410ba80a477ebab4c;p=thirdparty%2Fkernel%2Fstable-queue.git fix up 4.14 and 4.9 patch --- diff --git a/queue-4.14/pci-of-fix-i-o-space-page-leak.patch b/queue-4.14/pci-of-fix-i-o-space-page-leak.patch index 46746b1da72..2132eb98f1b 100644 --- a/queue-4.14/pci-of-fix-i-o-space-page-leak.patch +++ b/queue-4.14/pci-of-fix-i-o-space-page-leak.patch @@ -69,14 +69,25 @@ Signed-off-by: Sergei Shtylyov Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij -[Backport just for the new api which other patches need - gregkh] Signed-off-by: Greg Kroah-Hartman --- - drivers/pci/pci.c | 38 ++++++++++++++++++++++++++++++++++++++ - include/linux/pci.h | 2 ++ - 2 files changed, 40 insertions(+) + drivers/pci/host/pci-host-common.c | 2 - + drivers/pci/pci.c | 38 +++++++++++++++++++++++++++++++++++++ + include/linux/pci.h | 2 + + 3 files changed, 41 insertions(+), 1 deletion(-) +--- a/drivers/pci/host/pci-host-common.c ++++ b/drivers/pci/host/pci-host-common.c +@@ -45,7 +45,7 @@ static int gen_pci_parse_request_of_pci_ + + switch (resource_type(res)) { + case IORESOURCE_IO: +- err = pci_remap_iospace(res, iobase); ++ err = devm_pci_remap_iospace(dev, res, iobase); + if (err) { + dev_warn(dev, "error %d: failed to map resource %pR\n", + err, res); --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3446,6 +3446,44 @@ void pci_unmap_iospace(struct resource * diff --git a/queue-4.14/series b/queue-4.14/series index 0971805c554..ce6f7202472 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -189,6 +189,7 @@ btrfs-scrub-don-t-use-inode-page-cache-in-scrub_handle_errored_block.patch octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch net-usb-rtl8150-demote-allmulti-message-to-dev_dbg.patch kvmclock-fix-tsc-calibration-for-nested-guests.patch +pci-of-fix-i-o-space-page-leak.patch pci-versatile-fix-i-o-space-page-leak.patch net-qca_spi-avoid-packet-drop-during-initial-sync.patch net-qca_spi-make-sure-the-qca7000-reset-is-triggered.patch @@ -207,7 +208,6 @@ netfilter-conntrack-dccp-treat-sync-syncack-as-invalid-if-no-prior-state.patch packet-refine-ring-v3-block-size-test-to-hold-one-frame.patch net-smc-no-shutdown-in-state-smc_listen.patch parisc-remove-unnecessary-barriers-from-spinlock.h.patch -pci-of-fix-i-o-space-page-leak.patch pci-hotplug-don-t-leak-pci_slot-on-registration-failure.patch pci-skip-mps-logic-for-virtual-functions-vfs.patch pci-pciehp-fix-use-after-free-on-unplug.patch diff --git a/queue-4.9/pci-of-fix-i-o-space-page-leak.patch b/queue-4.9/pci-of-fix-i-o-space-page-leak.patch index c3b18fec75f..66deae4aff3 100644 --- a/queue-4.9/pci-of-fix-i-o-space-page-leak.patch +++ b/queue-4.9/pci-of-fix-i-o-space-page-leak.patch @@ -69,19 +69,30 @@ Signed-off-by: Sergei Shtylyov Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij -[Backport just for the new api which other patches need - gregkh] Signed-off-by: Greg Kroah-Hartman --- - drivers/pci/pci.c | 38 ++++++++++++++++++++++++++++++++++++++ - include/linux/pci.h | 2 ++ - 2 files changed, 40 insertions(+) + drivers/pci/host/pci-host-common.c | 2 - + drivers/pci/pci.c | 38 +++++++++++++++++++++++++++++++++++++ + include/linux/pci.h | 2 + + 3 files changed, 41 insertions(+), 1 deletion(-) +--- a/drivers/pci/host/pci-host-common.c ++++ b/drivers/pci/host/pci-host-common.c +@@ -45,7 +45,7 @@ static int gen_pci_parse_request_of_pci_ + + switch (resource_type(res)) { + case IORESOURCE_IO: +- err = pci_remap_iospace(res, iobase); ++ err = devm_pci_remap_iospace(dev, res, iobase); + if (err) { + dev_warn(dev, "error %d: failed to map resource %pR\n", + err, res); --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c -@@ -3436,6 +3436,44 @@ char * __weak __init pcibios_setup(char - return str; +@@ -3575,6 +3575,44 @@ int pci_try_set_mwi(struct pci_dev *dev) } + EXPORT_SYMBOL(pci_try_set_mwi); +static void devm_pci_unmap_iospace(struct device *dev, void *ptr) +{ @@ -122,8 +133,8 @@ Signed-off-by: Greg Kroah-Hartman +EXPORT_SYMBOL(devm_pci_remap_iospace); + /** - * pcibios_set_master - enable PCI bus-mastering for device dev - * @dev: the PCI device to enable + * pci_clear_mwi - disables Memory-Write-Invalidate for device dev + * @dev: the PCI device to disable --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1190,6 +1190,8 @@ int pci_register_io_range(phys_addr_t ad diff --git a/queue-4.9/series b/queue-4.9/series index 81083464ac6..62ecfadb679 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -109,6 +109,7 @@ pinctrl-nsp-fix-potential-null-dereference.patch drm-nouveau-gem-off-by-one-bugs-in-nouveau_gem_pushbuf_reloc_apply.patch net-ethernet-freescale-fman-fix-cross-build-error.patch net-usb-rtl8150-demote-allmulti-message-to-dev_dbg.patch +pci-of-fix-i-o-space-page-leak.patch pci-versatile-fix-i-o-space-page-leak.patch net-qca_spi-avoid-packet-drop-during-initial-sync.patch net-qca_spi-make-sure-the-qca7000-reset-is-triggered.patch @@ -121,7 +122,6 @@ xfrm_user-prevent-leaking-2-bytes-of-kernel-memory.patch netfilter-conntrack-dccp-treat-sync-syncack-as-invalid-if-no-prior-state.patch packet-refine-ring-v3-block-size-test-to-hold-one-frame.patch parisc-remove-unnecessary-barriers-from-spinlock.h.patch -pci-of-fix-i-o-space-page-leak.patch pci-hotplug-don-t-leak-pci_slot-on-registration-failure.patch pci-skip-mps-logic-for-virtual-functions-vfs.patch pci-pciehp-fix-use-after-free-on-unplug.patch