From: Kefeng Wang <wangkefeng.w...@huawei.com>

commit e8458e7afa855317b14915d7b86ab3caceea7eb6 upstream.

When CONFIG_SPARSE_IRQ is disable, the request_mutex in struct irq_desc
is not initialized which causes malfunction.

Fixes: 9114014cf4e6 ("genirq: Add mutex to irq desc to serialize 
request/free_irq()")
Signed-off-by: Kefeng Wang <wangkefeng.w...@huawei.com>
Signed-off-by: Thomas Gleixner <t...@linutronix.de>
Reviewed-by: Mukesh Ojha <mo...@codeaurora.org>
Cc: Marc Zyngier <marc.zyng...@arm.com>
Cc: <linux-arm-ker...@lists.infradead.org>
Cc: sta...@vger.kernel.org
Link: 
https://lkml.kernel.org/r/20190404074512.145533-1-wangkefeng.w...@huawei.com
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 kernel/irq/irqdesc.c |    1 +
 1 file changed, 1 insertion(+)

--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -535,6 +535,7 @@ int __init early_irq_init(void)
                alloc_masks(&desc[i], node);
                raw_spin_lock_init(&desc[i].lock);
                lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
+               mutex_init(&desc[i].request_mutex);
                desc_set_defaults(i, &desc[i], node, NULL, NULL);
        }
        return arch_early_irq_init();


Reply via email to