Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp596933pxx; Wed, 28 Oct 2020 12:02:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9I+fI28oKeSFNTqZIJ1ZUjE/E+4mkiFnAPy4DQijPqGJzwpaA2CvnmZzIJmjMvbOBW6Gh X-Received: by 2002:a1c:254:: with SMTP id 81mr256375wmc.21.1603911729503; Wed, 28 Oct 2020 12:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603911729; cv=none; d=google.com; s=arc-20160816; b=TkGF1hOrJaXo/6wg2tUs4gHqfjw9Auq3s7BhGbgbkDWDYSFIGRtoiMPa+vWV0ifKWU 1bEC7aKLVKGm0FoSGL2mhsAHgZWjxSxpQUYF7UKBWm6W1epKYKhbKKPjKKUWnSjQ1Hh4 hCX5yrXgjP9DnHH2GfykgXHFTxQpvGEUd3E1PPVKuDnE6OTIo/RVqZrxIKMYqdo4oZh9 TIm3ngiiAgkCTKqNPDuHpKw+DW1tiPhtXJL8TInP2/0P8oW4THJYawqOZYYJWN+UpcdG MIquv1USasujDPK1fWlPlHFp87G07WJ6i6lYWvvDTfmfRL73pyriWdGpzKpAbb9zvKL7 yHzw== 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=ISLrsjTG075U0Ire3PH29zy4YCp/KzhdV3TsxFxNiUA=; b=s6XUDAB3kurWRmPm5RjEiH/tlS8B1xR/8fKa6fdZKvT4c/0QnOZWYut3rwumgeIStc hcaCSgHVxjcIJwMPI6JHAGrtWNUxh6lkLlGBHGpusMTlp+ijMBBEYnBBbRhTIfReaNO1 0KJCiZeKMzSAl8dgYZvfHPW+hNzPNhjIzSSbAKOWcnLBY4Ati1iia00x+8HIJsxPESx4 N9c9AR5Z4EJmKCL3NWCn1BLwq9byRiIg45Svp1EB43y31bW1UaEXYGdgmAJnQq2TolyI XvzXJWPwL7/FhTLb6xFJwHy8uKkaOAHeEHkjZYk5pg/Z/bHtBbOzRE4HecC+vfCNHkGy sTnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yjrYK8En; 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 m26si11386edq.372.2020.10.28.12.01.47; Wed, 28 Oct 2020 12:02:09 -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=yjrYK8En; 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 S1826142AbgJ0SQm (ORCPT + 99 others); Tue, 27 Oct 2020 14:16:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:60778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756207AbgJ0OMA (ORCPT ); Tue, 27 Oct 2020 10:12:00 -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 237D6222EA; Tue, 27 Oct 2020 14:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807912; bh=gAnXIdKLsqUvOJAAyBxNNufl+z8q4nno/Dh7BsCrLTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yjrYK8En9cI4d0llMEaZMtlqVHM1Q+g0+lF+xGYi6TgeInCLbX9lqBHasSG3aYH7p grkhIzLuaJaNUNWRiiQtJ4CZMLaz4h/WsqjybkWqWcbNV71/MmOWVJqoCVd7I+3Gmf f5HVV96b9HZh5rmZ6M8smO4b5p75EOldebjrTsns= 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 4.14 087/191] powerpc/pseries: Fix missing of_node_put() in rng_init() Date: Tue, 27 Oct 2020 14:49:02 +0100 Message-Id: <20201027134913.874730204@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@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 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); -- 2.25.1