public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] genirq: Initialize resend_node hlist for all irq_desc
       [not found] <20240118112739.2000497-1-dawei.li@shingroup.cn>
@ 2024-01-18 11:27 ` Dawei Li
  2024-01-18 14:09   ` Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Dawei Li @ 2024-01-18 11:27 UTC (permalink / raw)
  To: tglx, maz
  Cc: sdonthineni, linux-arm-kernel, linux-kernel, dawei.li, set_pte_at,
	stable

For !CONFIG_SPARSE_IRQ kernel, early_irq_init() is supposed to
initialize all the desc entries in system, desc->resend_node
included.

Thus, initialize desc->resend_node for all irq_desc entries, rather
than irq_desc[0] only, which is the current implementation is about.

Fixes: bc06a9e08742 ("genirq: Use hlist for managing resend handlers")
Cc: stable@vger.kernel.org

Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
---
 kernel/irq/irqdesc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 27ca1c866f29..371eb1711d34 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -600,7 +600,7 @@ int __init early_irq_init(void)
 		mutex_init(&desc[i].request_mutex);
 		init_waitqueue_head(&desc[i].wait_for_threads);
 		desc_set_defaults(i, &desc[i], node, NULL, NULL);
-		irq_resend_init(desc);
+		irq_resend_init(&desc[i]);
 	}
 	return arch_early_irq_init();
 }
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 4/4] genirq: Initialize resend_node hlist for all irq_desc
  2024-01-18 11:27 ` [PATCH 4/4] genirq: Initialize resend_node hlist for all irq_desc Dawei Li
@ 2024-01-18 14:09   ` Marc Zyngier
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2024-01-18 14:09 UTC (permalink / raw)
  To: Dawei Li
  Cc: tglx, sdonthineni, linux-arm-kernel, linux-kernel, set_pte_at,
	stable

On Thu, 18 Jan 2024 11:27:39 +0000,
Dawei Li <dawei.li@shingroup.cn> wrote:
> 
> For !CONFIG_SPARSE_IRQ kernel, early_irq_init() is supposed to
> initialize all the desc entries in system, desc->resend_node
> included.
> 
> Thus, initialize desc->resend_node for all irq_desc entries, rather
> than irq_desc[0] only, which is the current implementation is about.
> 
> Fixes: bc06a9e08742 ("genirq: Use hlist for managing resend handlers")
> Cc: stable@vger.kernel.org
> 
> Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
> ---
>  kernel/irq/irqdesc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
> index 27ca1c866f29..371eb1711d34 100644
> --- a/kernel/irq/irqdesc.c
> +++ b/kernel/irq/irqdesc.c
> @@ -600,7 +600,7 @@ int __init early_irq_init(void)
>  		mutex_init(&desc[i].request_mutex);
>  		init_waitqueue_head(&desc[i].wait_for_threads);
>  		desc_set_defaults(i, &desc[i], node, NULL, NULL);
> -		irq_resend_init(desc);
> +		irq_resend_init(&desc[i]);
>  	}
>  	return arch_early_irq_init();
>  }

Well spotted. It would probably be worth having a helper that fully
initialises one desc, but that's out of the scope of this fix.

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-18 14:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240118112739.2000497-1-dawei.li@shingroup.cn>
2024-01-18 11:27 ` [PATCH 4/4] genirq: Initialize resend_node hlist for all irq_desc Dawei Li
2024-01-18 14:09   ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox