Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp223646pxx; Wed, 28 Oct 2020 03:18:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgQQfSvY682W772NWZiGLxYdqkDeme7oKfyrJfgYkuzyThvybcn7XxXBIAffPbPEpJiT2v X-Received: by 2002:a17:906:2e08:: with SMTP id n8mr6719943eji.476.1603880339299; Wed, 28 Oct 2020 03:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603880339; cv=none; d=google.com; s=arc-20160816; b=bNA8MlRk9Y+GZCFJb8YgTEovhgXCvdB8LUGPzc3VXmJXplZ1hB34rd0pszVXE5S2ky BjQBxlHgzw2vueGE14TzBpzXWqhYRfWCY8UigJZhny9DhwznodB23sZzkWu7aX34nowx B0ROm5omsFy6IiW2/Eyrzt3y9OQNsdSYTjysii/tpkzR8xjMnNu+wn4ak4l0kMvoCyR7 XLUsAl0M4zngeVhBTQ56uhFFdzlfaLcMdF/wDY0SHYm+6sgF9C2q+bBWaXDBAK4oxlrx EzEiavUhYihYmqlXD7mBv48zRlH5/61S3r+gRQVwV91hLnP8cBSYfBJn44xdgwMT+gXV Ps0w== 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=NjXrcJgKIrV8Ps0Pmz5mPASPk2HRtB5lbIERkA00Ue29K1Tq2b6KNJ1nqNVbvkKLFC t9X8B/HwTx2Lyb+RLnn2VEMM4z8CCE8WDS1mdq1SCFjL4oT/eDLn9Ls39Z/qlO0G7n+L nRZ+fcS6qnXgdFS/5aaHstsQBgGXDlmc19ZI4Cm36j/l7TH4u8+/pOLRKwb8LhKamGxq 4q0lZKUSb8UB0lKlyk8i/5WKV/aIfznkNSIJgBUXY4IeWSv+2uZuoW1ET32tqdFlnJ6F hMkSPX/vaKVM3Q5oB1MlipPS1N5K5XrIMYf33tfFVBmntPfykjZ2SWuYe0TFP9P5Br5a qM7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mkqPBzFG; 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 lg14si2653130ejb.82.2020.10.28.03.18.37; Wed, 28 Oct 2020 03:18:59 -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=mkqPBzFG; 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 S1749020AbgJ0Ohb (ORCPT + 99 others); Tue, 27 Oct 2020 10:37:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:36478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761000AbgJ0OhZ (ORCPT ); Tue, 27 Oct 2020 10:37:25 -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 B4C7B222E9; Tue, 27 Oct 2020 14:37:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809445; bh=2lf4uteV6LmPGW8kJ4FDcqRiQ4UcrmxFVigvV/E+Bqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mkqPBzFGSx8O+hYEWv3+oqJ8o+ItZp5cE0vnWoGLKz7SGuutWY6a7EmvtfnijRkQV rtnPC+sTMLeYDCL7ZcNh7vy06RDIZmtFq27gszMpqryTYrfqFJZrlUO+d4t3abzNfL H34e5bPI8TgZUSueq/TOoJ3ywCEYzsE0Xrohp7dw= 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.4 199/408] powerpc/pseries: Fix missing of_node_put() in rng_init() Date: Tue, 27 Oct 2020 14:52:17 +0100 Message-Id: <20201027135504.331770922@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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