提交 1fa459f2 编写于 作者: Z Zenghui Yu 提交者: Yang Yingliang

irqchip/mbigen: Free msi_desc on device teardown

stable inclusion
from linux-4.19.118
commit 654c9adb64e1bbdccc8cf238087d8eb343f3955f

--------------------------------

commit edfc23f6 upstream.

Using irq_domain_free_irqs_common() on the irqdomain free path will
leave the MSI descriptor unfreed when platform devices get removed.
Properly free it by MSI domain free function.

Fixes: 9650c60e ("irqchip/mbigen: Create irq domain for each mbigen device")
Signed-off-by: NZenghui Yu <yuzenghui@huawei.com>
Signed-off-by: NMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200408114352.1604-1-yuzenghui@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d900a9fe
...@@ -231,10 +231,16 @@ static int mbigen_irq_domain_alloc(struct irq_domain *domain, ...@@ -231,10 +231,16 @@ static int mbigen_irq_domain_alloc(struct irq_domain *domain,
return 0; return 0;
} }
static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq,
unsigned int nr_irqs)
{
platform_msi_domain_free(domain, virq, nr_irqs);
}
static const struct irq_domain_ops mbigen_domain_ops = { static const struct irq_domain_ops mbigen_domain_ops = {
.translate = mbigen_domain_translate, .translate = mbigen_domain_translate,
.alloc = mbigen_irq_domain_alloc, .alloc = mbigen_irq_domain_alloc,
.free = irq_domain_free_irqs_common, .free = mbigen_irq_domain_free,
}; };
static int mbigen_of_create_domain(struct platform_device *pdev, static int mbigen_of_create_domain(struct platform_device *pdev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册