“e7c1b32fd354c34c4dceb1736a485bc5d91f7c43”上不存在“arch/arm/include/asm/system.h”
提交 0c6e617f 编写于 作者: C Cathy Avery 提交者: Bjorn Helgaas

PCI: hv: Fix interrupt cleanup path

SR-IOV disabled from the host causes a memory leak.  pci-hyperv usually
first receives a PCI_EJECT notification and then proceeds to delete the
hpdev list entry in hv_eject_device_work().  Later in hv_msi_free() since
the device is no longer on the device list hpdev is NULL and hv_msi_free
returns without freeing int_desc as part of hv_int_desc_free().
Signed-off-by: NCathy Avery <cavery@redhat.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NJake Oshins <jakeo@microsoft.com>
上级 837d741e
...@@ -732,16 +732,18 @@ static void hv_msi_free(struct irq_domain *domain, struct msi_domain_info *info, ...@@ -732,16 +732,18 @@ static void hv_msi_free(struct irq_domain *domain, struct msi_domain_info *info,
pdev = msi_desc_to_pci_dev(msi); pdev = msi_desc_to_pci_dev(msi);
hbus = info->data; hbus = info->data;
hpdev = get_pcichild_wslot(hbus, devfn_to_wslot(pdev->devfn)); int_desc = irq_data_get_irq_chip_data(irq_data);
if (!hpdev) if (!int_desc)
return; return;
int_desc = irq_data_get_irq_chip_data(irq_data); irq_data->chip_data = NULL;
if (int_desc) { hpdev = get_pcichild_wslot(hbus, devfn_to_wslot(pdev->devfn));
irq_data->chip_data = NULL; if (!hpdev) {
hv_int_desc_free(hpdev, int_desc); kfree(int_desc);
return;
} }
hv_int_desc_free(hpdev, int_desc);
put_pcichild(hpdev, hv_pcidev_ref_by_slot); put_pcichild(hpdev, hv_pcidev_ref_by_slot);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册