Commit 82e1fb4d authored by Kefeng Wang's avatar Kefeng Wang Committed by Greg Kroah-Hartman

genirq: Initialize request_mutex if CONFIG_SPARSE_IRQ=n

commit e8458e7a upstream.

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

Fixes: 9114014c ("genirq: Add mutex to irq desc to serialize request/free_irq()")
Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarMukesh Ojha <mojha@codeaurora.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190404074512.145533-1-wangkefeng.wang@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3559f73e
...@@ -535,6 +535,7 @@ int __init early_irq_init(void) ...@@ -535,6 +535,7 @@ int __init early_irq_init(void)
alloc_masks(&desc[i], node); alloc_masks(&desc[i], node);
raw_spin_lock_init(&desc[i].lock); raw_spin_lock_init(&desc[i].lock);
lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); 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); desc_set_defaults(i, &desc[i], node, NULL, NULL);
} }
return arch_early_irq_init(); return arch_early_irq_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment