]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.35/genirq-initialize-request_mutex-if-config_sparse_irq-n.patch
Linux 4.19.35
[thirdparty/kernel/stable-queue.git] / releases / 4.19.35 / genirq-initialize-request_mutex-if-config_sparse_irq-n.patch
CommitLineData
1dabdb6f
GKH
1From e8458e7afa855317b14915d7b86ab3caceea7eb6 Mon Sep 17 00:00:00 2001
2From: Kefeng Wang <wangkefeng.wang@huawei.com>
3Date: Thu, 4 Apr 2019 15:45:12 +0800
4Subject: genirq: Initialize request_mutex if CONFIG_SPARSE_IRQ=n
5
6From: Kefeng Wang <wangkefeng.wang@huawei.com>
7
8commit e8458e7afa855317b14915d7b86ab3caceea7eb6 upstream.
9
10When CONFIG_SPARSE_IRQ is disable, the request_mutex in struct irq_desc
11is not initialized which causes malfunction.
12
13Fixes: 9114014cf4e6 ("genirq: Add mutex to irq desc to serialize request/free_irq()")
14Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
15Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
17Cc: Marc Zyngier <marc.zyngier@arm.com>
18Cc: <linux-arm-kernel@lists.infradead.org>
19Cc: stable@vger.kernel.org
20Link: https://lkml.kernel.org/r/20190404074512.145533-1-wangkefeng.wang@huawei.com
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23---
24 kernel/irq/irqdesc.c | 1 +
25 1 file changed, 1 insertion(+)
26
27--- a/kernel/irq/irqdesc.c
28+++ b/kernel/irq/irqdesc.c
29@@ -554,6 +554,7 @@ int __init early_irq_init(void)
30 alloc_masks(&desc[i], node);
31 raw_spin_lock_init(&desc[i].lock);
32 lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
33+ mutex_init(&desc[i].request_mutex);
34 desc_set_defaults(i, &desc[i], node, NULL, NULL);
35 }
36 return arch_early_irq_init();