lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.17 216/772] powerpc/xics: fix refcount leak in icp_opal_init()
    Date
    From: Lv Ruyi <lv.ruyi@zte.com.cn>

    [ Upstream commit 5dd9e27ea4a39f7edd4bf81e9e70208e7ac0b7c9 ]

    The of_find_compatible_node() function returns a node pointer with
    refcount incremented, use of_node_put() on it when done.

    Reported-by: Zeal Robot <zealci@zte.com.cn>
    Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20220402013419.2410298-1-lv.ruyi@zte.com.cn
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    arch/powerpc/sysdev/xics/icp-opal.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/arch/powerpc/sysdev/xics/icp-opal.c b/arch/powerpc/sysdev/xics/icp-opal.c
    index bda4c32582d9..4dae624b9f2f 100644
    --- a/arch/powerpc/sysdev/xics/icp-opal.c
    +++ b/arch/powerpc/sysdev/xics/icp-opal.c
    @@ -196,6 +196,7 @@ int __init icp_opal_init(void)

    printk("XICS: Using OPAL ICP fallbacks\n");

    + of_node_put(np);
    return 0;
    }

    --
    2.35.1


    \
     
     \ /
      Last update: 2022-06-07 22:54    [W:5.052 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site