kernel_samsung_a53x/arch/powerpc
Michael Ellerman 62519b10a4 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>
2024-11-30 02:33:27 +01:00
..
boot powerpc/boot: Only free if realloc() succeeds 2024-11-23 23:20:46 +01:00
configs powerpc/configs: Update defconfig with now user-visible CONFIG_FSL_IFC 2024-11-23 23:20:18 +01:00
crypto Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
include powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt. 2024-11-23 23:20:31 +01:00
kernel Revert "powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL" 2024-11-24 00:23:35 +01:00
kexec Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap() 2024-11-23 23:20:18 +01:00
lib powerpc: xor_vmx: Add '-mhard-float' to CFLAGS 2024-11-19 09:22:41 +01:00
math-emu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mm Revert "powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL" 2024-11-24 00:23:35 +01:00
net Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oprofile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks 2024-11-19 08:44:55 +01:00
platforms powerpc/powernv: Free name on error in opal_event_init() 2024-11-30 02:33:27 +01:00
purgatory Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysdev powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu 2024-11-23 23:20:45 +01:00
tools Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xmon powerpc/xmon: Fix disassembly CPU feature checks 2024-11-23 23:20:10 +01:00
Kbuild Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig.debug Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile.postlink Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00