Skip to content

Commit 06fde69

Browse files
Zenghui YuMarc Zyngier
authored andcommitted
genirq/msi: Initialize msi_alloc_info before calling msi_domain_prepare_irqs()
Since commit 5fe71d2 ("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: 5fe71d2 ("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
1 parent 2f5fbc4 commit 06fde69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/irq/msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
402402
struct msi_domain_ops *ops = info->ops;
403403
struct irq_data *irq_data;
404404
struct msi_desc *desc;
405-
msi_alloc_info_t arg;
405+
msi_alloc_info_t arg = { };
406406
int i, ret, virq;
407407
bool can_reserve;
408408

0 commit comments

Comments
 (0)