lkml.org 
[lkml]   [2019]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] genirq: Fix uninitialized request_mutex
From
Date

On 4/4/2019 1:15 PM, Kefeng Wang wrote:
> When !CONFIG_SPARSE_IRQ, request_mutex of struct irq_desc won't
> be initialiezed, it leads to system hung, fix it.
>
> Fixes: 9114014cf4e6 ("genirq: Add mutex to irq desc to serialize request/free_irq()")
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>


Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh

> ---
> kernel/irq/irqdesc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
> index 13539e12cd80..9f8a709337cf 100644
> --- a/kernel/irq/irqdesc.c
> +++ b/kernel/irq/irqdesc.c
> @@ -558,6 +558,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();

\
 
 \ /
  Last update: 2019-04-04 10:00    [W:0.059 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site