Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp265837pxx; Wed, 28 Oct 2020 04:30:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvPDQRqI3kY4CuGe0q+yl03RQhaCIxiI24POeg+J6fHjokSMaPl4hL3J+2h6LcGSmA6947 X-Received: by 2002:a17:906:7696:: with SMTP id o22mr6843426ejm.269.1603884654241; Wed, 28 Oct 2020 04:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603884654; cv=none; d=google.com; s=arc-20160816; b=ORvvgGQqmDhE5It8X5H5KUYmpCpFJAdZGjyPH/0f1fQQ9b0sgGZaBYGs4ZZ2BRkPxY 1TDF7T+E6GndPikJbPdJkXsppbNAtIvlXlJWnxf9Am0ClDP0PSzf481e1Scl94HxDsOY KqlOCqbWm6r9WBfmYVJ/07kcW+Ekv/maWLBzMmSHmPW6rlhFh5765sawwt77iGzxVngi AJ26XL1OWzhWgPhs4tEZKPMaRVbqabMG9oLwwz/sLhu3nbJNbp9hAboaGmgUPPskFlsm ZAo2O89RQ7XOq782PHrV2Bb1j0YvYEfqVTAY6t8OwQeUUXhf3vGiYRm0697eZWA2MLfC ZqVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PPKcn/1UcDe5Zay9OTYtzB4hEKv3iHadImUMTO1+8sI=; b=xBTB/2kGbcPypRIEvvSCypsW3t0Ri7Y2KxNPz6M+akrO9Gdq6pmlDM72sN/589m2Qv j9fpdG4oX463DsE/+kH4aXcnEVnCvYgxfbuEXYu6QT/bDbma1Z8orgFtCDfqmJSWEmb+ Sa2f6Ch/PGCq7D0CKl+akT2+CttFa11jbtkbVaI/ZcJu7cwBZwSUwevQE4RVpihpOD5F KhDR3wX5TQQbRDni4zCCB1erQfRslN5XyYSFQgCYDqF5Lu19Nu1s5WYghFT/wV+BfGS3 Tat2n1YCZziJmLeGCHXQADQfRAn5kI48XMlSq9oTf/8IghByKGVdl3c31FVT/MhhkCKx aYcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="o0/EnYQx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si3402013edu.343.2020.10.28.04.30.31; Wed, 28 Oct 2020 04:30:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="o0/EnYQx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1793710AbgJ0PH5 (ORCPT + 99 others); Tue, 27 Oct 2020 11:07:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:37040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1789741AbgJ0PCo (ORCPT ); Tue, 27 Oct 2020 11:02:44 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 67E7B2076B; Tue, 27 Oct 2020 15:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810962; bh=2lf4uteV6LmPGW8kJ4FDcqRiQ4UcrmxFVigvV/E+Bqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o0/EnYQxThu+joGiulpIEdz03y7aPUjoexsb7mBkEidgYF5oB0StxqnrAASEYlKbd Jc7mpSGpFdVR4atEDcnld1rc7uYhI9r7VNTauUGPs4mnLP/08EEGStzEfIZoDpki1O K+JAUldQekVl8gLePerU9SBiKNra0k8ZGG6VjLYQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Mc Guire , Michael Ellerman , Sasha Levin Subject: [PATCH 5.8 325/633] powerpc/pseries: Fix missing of_node_put() in rng_init() Date: Tue, 27 Oct 2020 14:51:08 +0100 Message-Id: <20201027135537.926383046@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Mc Guire [ 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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1530522496-14816-1-git-send-email-hofrat@osadl.org Signed-off-by: Sasha Levin --- arch/powerpc/platforms/pseries/rng.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/rng.c b/arch/powerpc/platforms/pseries/rng.c index bbb97169bf63e..6268545947b83 100644 --- a/arch/powerpc/platforms/pseries/rng.c +++ b/arch/powerpc/platforms/pseries/rng.c @@ -36,6 +36,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); -- 2.25.1