All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irq: Fix uninitialized pointers
@ 2025-05-27  9:35 Gyeyoung Baek
  2025-06-11  6:39 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Gyeyoung Baek @ 2025-05-27  9:35 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, Gyeyoung Baek

Fix uninitialized `ops` member's pointers to avoid kernel Oops in `irq_sim_request_resources()`.

Signed-off-by: Gyeyoung Baek <gye976@gmail.com>
---
 kernel/irq/irq_sim.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c
index 1a3d483548e2..67fd1de5d197 100644
--- a/kernel/irq/irq_sim.c
+++ b/kernel/irq/irq_sim.c
@@ -222,8 +222,12 @@ struct irq_domain *irq_domain_create_sim_full(struct fwnode_handle *fwnode,
 	work_ctx->pending = no_free_ptr(pending);
 	work_ctx->user_data = data;
 
-	if (ops)
+	if (ops) {
 		memcpy(&work_ctx->ops, ops, sizeof(*ops));
+	} else {
+		work_ctx->ops.irq_sim_irq_released = NULL;
+		work_ctx->ops.irq_sim_irq_requested = NULL;
+	}
 
 	return no_free_ptr(work_ctx)->domain;
 }
-- 
2.43.0


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

end of thread, other threads:[~2025-06-12 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27  9:35 [PATCH] irq: Fix uninitialized pointers Gyeyoung Baek
2025-06-11  6:39 ` Thomas Gleixner
2025-06-12 11:41   ` Gyeyoung Baek

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.