Patch "powerpc/powernv: Free name on error in opal_event_init()" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    powerpc/powernv: Free name on error in opal_event_init()

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-powernv-free-name-on-error-in-opal_event_ini.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f4bd4581f75d7ddda445d638ff866bfc915efe7c
Author: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Date:   Fri Sep 20 19:35:20 2024 +1000

    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@xxxxxx>
    Closes: https://lore.kernel.org/linuxppc-dev/87wmjp3wig.fsf@mail.lhotse
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://patch.msgid.link/20240920093520.67997-1-mpe@xxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/platforms/powernv/opal-irqchip.c b/arch/powerpc/platforms/powernv/opal-irqchip.c
index e71f2111c8c0b..676ec9fdd115d 100644
--- a/arch/powerpc/platforms/powernv/opal-irqchip.c
+++ b/arch/powerpc/platforms/powernv/opal-irqchip.c
@@ -289,6 +289,7 @@ int __init opal_event_init(void)
 				 name, NULL);
 		if (rc) {
 			pr_warn("Error %d requesting OPAL irq %d\n", rc, (int)r->start);
+			kfree(name);
 			continue;
 		}
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux