Skip to content

Commit 8a2277a

Browse files
gye976KAGA-KOKO
authored andcommitted
genirq/irq_sim: Initialize work context pointers properly
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 72218d7 commit 8a2277a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/irq/irq_sim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ struct irq_domain *irq_domain_create_sim_full(struct fwnode_handle *fwnode,
202202
void *data)
203203
{
204204
struct irq_sim_work_ctx *work_ctx __free(kfree) =
205-
kmalloc(sizeof(*work_ctx), GFP_KERNEL);
205+
kzalloc(sizeof(*work_ctx), GFP_KERNEL);
206206

207207
if (!work_ctx)
208208
return ERR_PTR(-ENOMEM);

0 commit comments

Comments
 (0)