summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorZenghui Yu <yuzenghui@huawei.com>2020-12-18 14:00:39 +0800
committerMarc Zyngier <maz@kernel.org>2020-12-18 17:42:18 +0000
commit06fde695ee76429634c1e8c8c1154035aa61191e (patch)
tree56fa4ad2c765d241bb8187d2eac79f049c4c784b /kernel
parent2f5fbc4305d07725bfebaedb09e57271315691ef (diff)
downloadlinux-06fde695ee76429634c1e8c8c1154035aa61191e.tar.gz
linux-06fde695ee76429634c1e8c8c1154035aa61191e.tar.bz2
linux-06fde695ee76429634c1e8c8c1154035aa61191e.zip
genirq/msi: Initialize msi_alloc_info before calling msi_domain_prepare_irqs()
Since commit 5fe71d271df8 ("irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device"), some of the devices are wrongly marked as "shared" by the ITS driver on systems equipped with the ITS(es). The problem is that the @info->flags may not be initialized anywhere and we end up looking at random bits on the stack. That's obviously not good. We can perform the initialization in the IRQ core layer before calling msi_domain_prepare_irqs(), which is neat enough. Fixes: 5fe71d271df8 ("irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device") Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20201218060039.1770-1-yuzenghui@huawei.com
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/msi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 2c0c4d6d0f83..dc0e2d7fbdfd 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -402,7 +402,7 @@ int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
struct msi_domain_ops *ops = info->ops;
struct irq_data *irq_data;
struct msi_desc *desc;
- msi_alloc_info_t arg;
+ msi_alloc_info_t arg = { };
int i, ret, virq;
bool can_reserve;