mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-09 00:02:02 +08:00
genirq/irq_sim: Initialize work context pointers properly
[ Upstream commit8a2277a3c9] Initialize `ops` member's pointers properly by using kzalloc() instead of kmalloc() when allocating the simulation work context. Otherwise the pointers contain random content leading to invalid dereferencing. Signed-off-by: Gyeyoung Baek <gye976@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250612124827.63259-1-gye976@gmail.com [ The context change is due to the commit011f583781("genirq/irq_sim: add an extended irq_sim initializer") which is irrelevant to the logic of this patch. ] Signed-off-by: Rahul Sharma <black.hawk@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bddab1586c
commit
c71aa4bb52
@@ -166,7 +166,7 @@ struct irq_domain *irq_domain_create_sim(struct fwnode_handle *fwnode,
|
||||
{
|
||||
struct irq_sim_work_ctx *work_ctx;
|
||||
|
||||
work_ctx = kmalloc(sizeof(*work_ctx), GFP_KERNEL);
|
||||
work_ctx = kzalloc(sizeof(*work_ctx), GFP_KERNEL);
|
||||
if (!work_ctx)
|
||||
goto err_out;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user