Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp164138pxx; Wed, 28 Oct 2020 01:15:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTsUhbHNTue7wOEgwXIeORIvQjWNylsEk5yanrNVP/cxTBwLch/+7z/2RNXPSYQ8LuZ0Kv X-Received: by 2002:aa7:d5d8:: with SMTP id d24mr6841581eds.8.1603872954587; Wed, 28 Oct 2020 01:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603872954; cv=none; d=google.com; s=arc-20160816; b=P/fxH2mxP3G31SoHaXQpDlnUWAnCTOUpPt/WAUhpRXbUPvuFDJhuBe4R1cAHHqrP+U XbFho5/sq3ab42e8YU0+KS7hn+Ow/xBS/zkVCPRm+AabrgwYNNU/0ITurJoPNm7AQMUb fSff7eX9sd3TyhsKiKZ6zw+O7VBfYzqlM1f9R+f7Eoz/ZHl5y1wRJGrDAbKZ2itTTFGY iWovq/QmIR7jPN4pQRjsSVBB5vPPewX0jSjvE54eY/tLFWh5vHXI8Ee3OOgQja0R87mU nX33q7kkaOsSUUya2RoTfnPs3SZNhTIuffBkc6c7cMlmj87+YzHeaU4Fhp4mHZ7lTEQJ eD2g== 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=hmxXkHPZDPlrrnDh9BSlqioFShWKYJbNNL0zJ8XF2LI=; b=JxYcMB7tC0WvJY2L3eqfEk7WVc1fhH3E1G40v6JyHjt1HU3gJZHRjOI3lmByFS3vrw BMYe+vRi8thcR7xiIy2SSpsOH+W00eyaKF6fjdztGHkLNcGfQp9UnMAinoGOO7liPyXH y3G8PQp+ZaHn69m2ldQqFBAWh/gBv63O8qBQCvVU6PnGsj0g6Ffu+ZKQNieGDNoaS2ab 6vjOCvkla3VfGHvOjcAygUb4hrdqyfynJ8LysXphH0do8aQFpKr6x35pctmeEkqe1An1 ELicecJW8Fw9G2jEZNEB1KMOetmSHRXqZ/+1gimUK6FsYIuvomW0wgeP67XxmTgxOtI9 NfTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qwOapAAp; 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 d4si2698178edr.173.2020.10.28.01.15.32; Wed, 28 Oct 2020 01:15: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=qwOapAAp; 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 S1753602AbgJ0OBB (ORCPT + 99 others); Tue, 27 Oct 2020 10:01:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:46386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753202AbgJ0N66 (ORCPT ); Tue, 27 Oct 2020 09:58:58 -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 45331218AC; Tue, 27 Oct 2020 13:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807137; bh=tKQMJJwDXpMZnW9cdlkALEdVFSaEaABQEBTHHsTXEZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qwOapAApvK4SvDjJyDK14f6+xap66Yhc4yPT2cmXuYztN738ddT7/f6802/azxv+s wtB1dX8kECcAT2OkAhePSYrbhdl/itnyjrvoYl1/yseUtgl57e/4LE+e5bDQSjlDPJ 5KpXsLF3slI3yZic73440YiIJyPbI7q1sWkajCBw= 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 055/112] powerpc/icp-hv: Fix missing of_node_put() in success path Date: Tue, 27 Oct 2020 14:49:25 +0100 Message-Id: <20201027134903.167585361@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 d3e669f31ec35856f5e85df9224ede5bdbf1bc7b ] Both of_find_compatible_node() and of_find_node_by_type() will return a refcounted node on success - thus for the success path the node must be explicitly released with a of_node_put(). Fixes: 0b05ac6e2480 ("powerpc/xics: Rewrite XICS driver") Signed-off-by: Nicholas Mc Guire Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1530691407-3991-1-git-send-email-hofrat@osadl.org Signed-off-by: Sasha Levin --- arch/powerpc/sysdev/xics/icp-hv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/sysdev/xics/icp-hv.c b/arch/powerpc/sysdev/xics/icp-hv.c index c1917cf67c3de..3205e64c452bd 100644 --- a/arch/powerpc/sysdev/xics/icp-hv.c +++ b/arch/powerpc/sysdev/xics/icp-hv.c @@ -179,6 +179,7 @@ int icp_hv_init(void) icp_ops = &icp_hv_ops; + of_node_put(np); return 0; } -- 2.25.1