mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
genirq/irq_sim: Initialize work context pointers properly
[ Upstream commit 8a2277a3c9
]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c584b9b62c
commit
19bd759785
|
@ -202,7 +202,7 @@ struct irq_domain *irq_domain_create_sim_full(struct fwnode_handle *fwnode,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
struct irq_sim_work_ctx *work_ctx __free(kfree) =
|
struct irq_sim_work_ctx *work_ctx __free(kfree) =
|
||||||
kmalloc(sizeof(*work_ctx), GFP_KERNEL);
|
kzalloc(sizeof(*work_ctx), GFP_KERNEL);
|
||||||
|
|
||||||
if (!work_ctx)
|
if (!work_ctx)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user