Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb7d1bcf authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull PCI fixes from Bjorn Helgaas:

 - Fix crashes that happen when PHY drivers are left disabled in the V3
   Semiconductor, MediaTek, Faraday, Aardvark, DesignWare, Versatile,
   and X-Gene host controller drivers (Sergei Shtylyov)

 - Fix a NULL pointer dereference in the endpoint library configfs
   support (Kishon Vijay Abraham I)

 - Fix a race condition in Hyper-V IRQ handling (Dexuan Cui)

* tag 'pci-v4.18-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: v3-semi: Fix I/O space page leak
  PCI: mediatek: Fix I/O space page leak
  PCI: faraday: Fix I/O space page leak
  PCI: aardvark: Fix I/O space page leak
  PCI: designware: Fix I/O space page leak
  PCI: versatile: Fix I/O space page leak
  PCI: xgene: Fix I/O space page leak
  PCI: OF: Fix I/O space page leak
  PCI: endpoint: Fix NULL pointer dereference error when CONFIGFS is disabled
  PCI: hv: Disable/enable IRQs rather than BH in hv_compose_msi_msg()
parents f39f28ff 270ed733
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -363,7 +363,8 @@ int dw_pcie_host_init(struct pcie_port *pp)
	resource_list_for_each_entry_safe(win, tmp, &bridge->windows) {
		switch (resource_type(win->res)) {
		case IORESOURCE_IO:
			ret = pci_remap_iospace(win->res, pp->io_base);
			ret = devm_pci_remap_iospace(dev, win->res,
						     pp->io_base);
			if (ret) {
				dev_warn(dev, "Error %d: failed to map resource %pR\n",
					 ret, win->res);
+1 −1
Original line number Diff line number Diff line
@@ -849,7 +849,7 @@ static int advk_pcie_parse_request_of_pci_ranges(struct advk_pcie *pcie)
					     0,	0xF8000000, 0,
					     lower_32_bits(res->start),
					     OB_PCIE_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);
+1 −1
Original line number Diff line number Diff line
@@ -503,7 +503,7 @@ static int faraday_pci_probe(struct platform_device *pdev)
				dev_err(dev, "illegal IO mem size\n");
				return -EINVAL;
			}
			ret = pci_remap_iospace(io, io_base);
			ret = devm_pci_remap_iospace(dev, io, io_base);
			if (ret) {
				dev_warn(dev, "error %d: failed to map resource %pR\n",
					 ret, io);
+5 −3
Original line number Diff line number Diff line
@@ -1073,6 +1073,7 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
	struct pci_bus *pbus;
	struct pci_dev *pdev;
	struct cpumask *dest;
	unsigned long flags;
	struct compose_comp_ctxt comp;
	struct tran_int_desc *int_desc;
	struct {
@@ -1164,14 +1165,15 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
		 * the channel callback directly when channel->target_cpu is
		 * the current CPU. When the higher level interrupt code
		 * calls us with interrupt enabled, let's add the
		 * local_bh_disable()/enable() to avoid race.
		 * local_irq_save()/restore() to avoid race:
		 * hv_pci_onchannelcallback() can also run in tasklet.
		 */
		local_bh_disable();
		local_irq_save(flags);

		if (hbus->hdev->channel->target_cpu == smp_processor_id())
			hv_pci_onchannelcallback(hbus);

		local_bh_enable();
		local_irq_restore(flags);

		if (hpdev->state == hv_pcichild_ejecting) {
			dev_err_once(&hbus->hdev->device,
+1 −1
Original line number Diff line number Diff line
@@ -537,7 +537,7 @@ static int v3_pci_setup_resource(struct v3_pci *v3,
		v3->io_bus_addr = io->start - win->offset;
		dev_dbg(dev, "I/O window %pR, bus addr %pap\n",
			io, &v3->io_bus_addr);
		ret = pci_remap_iospace(io, io_base);
		ret = devm_pci_remap_iospace(dev, io, io_base);
		if (ret) {
			dev_warn(dev,
				 "error %d: failed to map resource %pR\n",
Loading