Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp161713pxx; Wed, 28 Oct 2020 01:10:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG5PV+Rel8ComtmHftsnzIaj/s2jAC/K/LFDyJhFsa8VS782Zu3EHahOsmZREyTbhk9UJ9 X-Received: by 2002:a17:907:2677:: with SMTP id ci23mr6355109ejc.270.1603872619503; Wed, 28 Oct 2020 01:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603872619; cv=none; d=google.com; s=arc-20160816; b=BWgzf10SlQE+qgS3JMWapjN085AzSAZXMzhOGbzm/h2J5S4CmzMXrePrsHeW0CEuNh gUzY0gnW5ayBmJtOKk1mkF2ZtyfencDE9fjtnsiB3vkIG3a2Sl67X67uhKoJ9NJd+H3j p192yC6OQwhrnGMyOj1qurQ9irEose7QKUwn4QhCtxPA03tHyy0eBy4JvrnC9D+o6pmv 20BxvrKkqHffKxvzTzdmWu9Omh6f7fWYikhjZXPIhE6lk62etE4GhW/kTeNQaqfV5nIm nUzf1MTsszw9iYwW4sDTJKCGCRx2dl694g/NbuHjUj0ztqcNdXUu9asYjjNrjIM7rGMG eJyw== 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=aCgX1IJjwsEScPvK0paCqz/LvcpL70KFoLAbZm4/yQ/evWN535rq3ZuZiXYjahV44R 3U+5X3+BmLK9AOGxMbLcW8esVPdCjPI1z6R8DjU8CRSyn4mkT4uyxQd12HgHjRyIXZAN Bv19wunA8WgsIgy0nVSdOhrU0Hsk3NgolimUNn4lr5IhomkIDERTlZiXwQXrzYThLPeG /Y4m7lms1zceRJoGGFV9nyu4k9subqIwtUMkPREDYm2HlWfr2zbOgb0LRVTDKY1+cstM ZsVUab70pyZXqW2XZgKQ2o4dM/U0gvE+zTrUbc68Gf6fPwx7FO6CSF4jSyPxvoca6DJM LnAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y7uGJlls; 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 y19si2789537ejd.730.2020.10.28.01.09.57; Wed, 28 Oct 2020 01:10:19 -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=y7uGJlls; 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 S1752780AbgJ0N65 (ORCPT + 99 others); Tue, 27 Oct 2020 09:58:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:46296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733580AbgJ0N6x (ORCPT ); Tue, 27 Oct 2020 09:58:53 -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 297212068D; Tue, 27 Oct 2020 13:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807132; bh=gAnXIdKLsqUvOJAAyBxNNufl+z8q4nno/Dh7BsCrLTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y7uGJlls4rXB0mC9WmaGAhmKsAeW2BQ+gkjPAyB/Jadij/Rqkw5ciOP27402L6GtE qMrPU6IxiGFklqegbe5wqlgTzcYC+jT04rkeCaD6+C4KBobLkVRsEpWVbCBHpMTB6m dBdizCfi8k9LiiSgWKzA/+Tq/yL2pgMvGkg9r4oU= 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.4 054/112] powerpc/pseries: Fix missing of_node_put() in rng_init() Date: Tue, 27 Oct 2020 14:49:24 +0100 Message-Id: <20201027134903.128807758@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134900.532249571@linuxfoundation.org> References: <20201027134900.532249571@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