Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp169790pxx; Wed, 28 Oct 2020 01:27:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnJlZbuvcVgQAfHbonNgymRfD7VBaWuDNf8r9963oerZrAjmhoq14xlRrF0xidcD52Swk3 X-Received: by 2002:a17:906:3541:: with SMTP id s1mr6629650eja.413.1603873669728; Wed, 28 Oct 2020 01:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603873669; cv=none; d=google.com; s=arc-20160816; b=BnMsBRaP1QCtxL73mQJu3CLTNHyncpPLyTPfPbZTA6GVCTTMftoR3M5Gftc56XPrf9 6H2m6M/F69OySUkcmwoGimB1A3l9rGZB+JSIwzfe5P95d6cKTqIqXgjrRQO7zop8c+E7 ItfX8VwmQjnc27BCMUMdeYZH42bLs3zH84JFLtPLiHAM9lig/aJso4p+NnVv8pegl6Mz UE0vBRl7c1RiUB+RkqLAXkLXYl8iVQhuYAsRphIaiSxW30UBoSw5HUHkHtioVd7KYejd RhMUiOG23Yd80tgSoHjJJvoxRf5dQ5qURGSkWcIGht96ksdof9bK/3FLGIqYycfp3VwX KZRA== 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=pTZvbs7TtcGACzAgkIKQZtjPOgZ1eJrT0SLg7ZRTxmNNRXllVfqDIrySYZfkHEdd/u 5GfOe3OKni5I5ifq9rI+X/01NZLCyjE5CZrS0O3RFhFaC1+2/Da1jpV6iYzs2LJJSlBZ 79jy4rmFtRnORXQ0nKo4f5fUotIWEDafC/BLiPXwMSWAn5hbxhrFpH/U6ARAaOjYwz2e TJUbm6W4l1p7SuZy4T8iekOFa0tufnORnit/sdBbeOPZs/yNj9FXZnITpl1L6v1560xr qsjrGRs43/iv4PBSci5zoeN64h9DVU1cvG5oMhs/sB6baj9lEcCsx08+Dc9+88aCNkiv 3QEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bUdTTp99; 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 f19si2736409edx.542.2020.10.28.01.27.27; Wed, 28 Oct 2020 01:27:49 -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=bUdTTp99; 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 S1754105AbgJ0OER (ORCPT + 99 others); Tue, 27 Oct 2020 10:04:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:52502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504863AbgJ0OEM (ORCPT ); Tue, 27 Oct 2020 10:04:12 -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 D372A2222C; Tue, 27 Oct 2020 14:04:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807452; bh=gAnXIdKLsqUvOJAAyBxNNufl+z8q4nno/Dh7BsCrLTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bUdTTp99Nde9AbG5OEVYXTgeW49D4VohqVeCLJj7bGZDMkaeZiBwc2Otl+conYuvZ ZWTsux20LfqzRv0rG+nbedJGOX9uPLiG9QxhHipeIEHX9tBpoqZ6j0OjlyixmEIkFq zUjdIL5u0KsDHP3A4xHNr+i5Fv7sUJNuWTpnFhBk= 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.9 058/139] powerpc/pseries: Fix missing of_node_put() in rng_init() Date: Tue, 27 Oct 2020 14:49:12 +0100 Message-Id: <20201027134904.880807636@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@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