* [PATCH] genirq: Fix uninitialized request_mutex
@ 2019-04-04 7:45 ` Kefeng Wang
0 siblings, 0 replies; 5+ messages in thread
From: Kefeng Wang @ 2019-04-04 7:45 UTC (permalink / raw)
To: Thomas Gleixner, Marc Zyngier, linux-kernel, linux-arm-kernel; +Cc: Kefeng Wang
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>
---
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();
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] genirq: Fix uninitialized request_mutex
@ 2019-04-04 7:45 ` Kefeng Wang
0 siblings, 0 replies; 5+ messages in thread
From: Kefeng Wang @ 2019-04-04 7:45 UTC (permalink / raw)
To: Thomas Gleixner, Marc Zyngier, linux-kernel, linux-arm-kernel; +Cc: Kefeng Wang
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>
---
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();
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] genirq: Fix uninitialized request_mutex
2019-04-04 7:45 ` Kefeng Wang
@ 2019-04-04 7:59 ` Mukesh Ojha
-1 siblings, 0 replies; 5+ messages in thread
From: Mukesh Ojha @ 2019-04-04 7:59 UTC (permalink / raw)
To: Kefeng Wang, Thomas Gleixner, Marc Zyngier, linux-kernel,
linux-arm-kernel
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();
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] genirq: Fix uninitialized request_mutex
@ 2019-04-04 7:59 ` Mukesh Ojha
0 siblings, 0 replies; 5+ messages in thread
From: Mukesh Ojha @ 2019-04-04 7:59 UTC (permalink / raw)
To: Kefeng Wang, Thomas Gleixner, Marc Zyngier, linux-kernel,
linux-arm-kernel
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();
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:irq/urgent] genirq: Initialize request_mutex if CONFIG_SPARSE_IRQ=n
2019-04-04 7:45 ` Kefeng Wang
(?)
(?)
@ 2019-04-05 12:43 ` tip-bot for Kefeng Wang
-1 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Kefeng Wang @ 2019-04-05 12:43 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-arm-kernel, linux-kernel, wangkefeng.wang, tglx, mingo,
marc.zyngier, mojha, hpa
Commit-ID: e8458e7afa855317b14915d7b86ab3caceea7eb6
Gitweb: https://git.kernel.org/tip/e8458e7afa855317b14915d7b86ab3caceea7eb6
Author: Kefeng Wang <wangkefeng.wang@huawei.com>
AuthorDate: Thu, 4 Apr 2019 15:45:12 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 5 Apr 2019 14:37:56 +0200
genirq: Initialize request_mutex if CONFIG_SPARSE_IRQ=n
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.wang@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Mukesh 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.com
---
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();
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-05 12:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-04 7:45 [PATCH] genirq: Fix uninitialized request_mutex Kefeng Wang
2019-04-04 7:45 ` Kefeng Wang
2019-04-04 7:59 ` Mukesh Ojha
2019-04-04 7:59 ` Mukesh Ojha
2019-04-05 12:43 ` [tip:irq/urgent] genirq: Initialize request_mutex if CONFIG_SPARSE_IRQ=n tip-bot for Kefeng Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.