]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/powernv: Free name on error in opal_event_init()
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 20 Sep 2024 09:35:20 +0000 (19:35 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Nov 2024 14:06:25 +0000 (15:06 +0100)
commit79c12f418ececd0073a10ff33c2c46f127e2af7c
treeabdbeb8d7b2041bd1de26d2ff80c022b0ce6d8a4
parent4c3dcbb14e57ef94b9df4b7a3efd248243224bfe
powerpc/powernv: Free name on error in opal_event_init()

[ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ]

In opal_event_init() if request_irq() fails name is not freed, leading
to a memory leak. The code only runs at boot time, there's no way for a
user to trigger it, so there's no security impact.

Fix the leak by freeing name in the error path.

Reported-by: 2639161967 <2639161967@qq.com>
Closes: https://lore.kernel.org/linuxppc-dev/87wmjp3wig.fsf@mail.lhotse
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20240920093520.67997-1-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/powernv/opal-irqchip.c