Patch "powerpc/pseries: Fix missing of_node_put() in rng_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/pseries: Fix missing of_node_put() in rng_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-pseries-fix-missing-of_node_put-in-rng_init.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 86ba2821f5e29dfaa214be99a9eb3a07a0f8f6f6
Author: Nicholas Mc Guire <hofrat@xxxxxxxxx>
Date:   Mon Jul 2 11:08:16 2018 +0200

    powerpc/pseries: Fix missing of_node_put() in rng_init()
    
    [ Upstream commit 67c3e59443f5fc77be39e2ce0db75fbfa78c7965 ]
    
    The call to of_find_compatible_node() returns a node pointer with
    refcount incremented thus it must be explicitly decremented here
    before returning.
    
    Fixes: a489043f4626 ("powerpc/pseries: Implement arch_get_random_long() based on H_RANDOM")
    Signed-off-by: Nicholas Mc Guire <hofrat@xxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1530522496-14816-1-git-send-email-hofrat@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/platforms/pseries/rng.c b/arch/powerpc/platforms/pseries/rng.c
index 31ca557af60bc..262b8c5e1b9d0 100644
--- a/arch/powerpc/platforms/pseries/rng.c
+++ b/arch/powerpc/platforms/pseries/rng.c
@@ -40,6 +40,7 @@ static __init int rng_init(void)
 
 	ppc_md.get_random_seed = pseries_get_random_long;
 
+	of_node_put(dn);
 	return 0;
 }
 machine_subsys_initcall(pseries, rng_init);



[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