]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.35/genirq-initialize-request_mutex-if-config_sparse_irq-n.patch
Linux 4.14.112
[thirdparty/kernel/stable-queue.git] / releases / 4.19.35 / genirq-initialize-request_mutex-if-config_sparse_irq-n.patch
1 From e8458e7afa855317b14915d7b86ab3caceea7eb6 Mon Sep 17 00:00:00 2001
2 From: Kefeng Wang <wangkefeng.wang@huawei.com>
3 Date: Thu, 4 Apr 2019 15:45:12 +0800
4 Subject: genirq: Initialize request_mutex if CONFIG_SPARSE_IRQ=n
5
6 From: Kefeng Wang <wangkefeng.wang@huawei.com>
7
8 commit e8458e7afa855317b14915d7b86ab3caceea7eb6 upstream.
9
10 When CONFIG_SPARSE_IRQ is disable, the request_mutex in struct irq_desc
11 is not initialized which causes malfunction.
12
13 Fixes: 9114014cf4e6 ("genirq: Add mutex to irq desc to serialize request/free_irq()")
14 Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
15 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
17 Cc: Marc Zyngier <marc.zyngier@arm.com>
18 Cc: <linux-arm-kernel@lists.infradead.org>
19 Cc: stable@vger.kernel.org
20 Link: https://lkml.kernel.org/r/20190404074512.145533-1-wangkefeng.wang@huawei.com
21 Signed-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();