提交 399fc34c 编写于 作者: Y Yang Yingliang 提交者: Xie XiuQi

Revert "platform-msi: Free descriptors in platform_msi_domain_free()"

euler inclusion
category: bugfix
bugzilla: 5359
CVE: NA

Drop this patch, but use the patch in LTS kernel.
-------------------

This reverts commit 698ac96606173d99c1b2f8fded0990c30047ee3c.
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 b9574483
...@@ -366,16 +366,14 @@ void platform_msi_domain_free(struct irq_domain *domain, unsigned int virq, ...@@ -366,16 +366,14 @@ void platform_msi_domain_free(struct irq_domain *domain, unsigned int virq,
unsigned int nvec) unsigned int nvec)
{ {
struct platform_msi_priv_data *data = domain->host_data; struct platform_msi_priv_data *data = domain->host_data;
struct msi_desc *desc, *tmp; struct msi_desc *desc;
for_each_msi_entry_safe(desc, tmp, data->dev) { for_each_msi_entry(desc, data->dev) {
if (WARN_ON(!desc->irq || desc->nvec_used != 1)) if (WARN_ON(!desc->irq || desc->nvec_used != 1))
return; return;
if (!(desc->irq >= virq && desc->irq < (virq + nvec))) if (!(desc->irq >= virq && desc->irq < (virq + nvec)))
continue; continue;
irq_domain_free_irqs_common(domain, desc->irq, 1); irq_domain_free_irqs_common(domain, desc->irq, 1);
list_del(&desc->list);
free_msi_entry(desc);
} }
} }
......
...@@ -116,8 +116,6 @@ struct msi_desc { ...@@ -116,8 +116,6 @@ struct msi_desc {
list_first_entry(dev_to_msi_list((dev)), struct msi_desc, list) list_first_entry(dev_to_msi_list((dev)), struct msi_desc, list)
#define for_each_msi_entry(desc, dev) \ #define for_each_msi_entry(desc, dev) \
list_for_each_entry((desc), dev_to_msi_list((dev)), list) list_for_each_entry((desc), dev_to_msi_list((dev)), list)
#define for_each_msi_entry_safe(desc, tmp, dev) \
list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list)
#ifdef CONFIG_PCI_MSI #ifdef CONFIG_PCI_MSI
#define first_pci_msi_entry(pdev) first_msi_entry(&(pdev)->dev) #define first_pci_msi_entry(pdev) first_msi_entry(&(pdev)->dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册