Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3524117pxj; Mon, 24 May 2021 08:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0x1HqxzWhd4duMf22yUaKJ3pR1K0f4AfX2wjZ/QP3Gf8PN5FOLQ4LuwDYn3q5PEGPFo8+ X-Received: by 2002:a05:6602:3427:: with SMTP id n39mr17068971ioz.157.1621870645215; Mon, 24 May 2021 08:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870645; cv=none; d=google.com; s=arc-20160816; b=POecH3sECGr6ICONMMjUX4ZW6fjqUB2zWEIxUpN2uYeT4/5amXGc1nr+n8uNR+weYu mXp1IdObBd81IPnna4h4oxp8CXJI7Bnh/IPOoUlUtdJBUJ1a15i0XWKyUitVB+cf0py3 L6hiSkh/ac+//RUeDBXtQU/iUW+MwHt/BR7cA3/1V+da/Nwa6NA9+fMaGu4TushF0L5g xhGgXxS33djOAtiJSNVsTJOcIBO/gKJA4yseaNdwzba634RosKrk0iXQ6em32hKhT6dC 1StGYR8OJ9pit30MRHRSndvxQmUQ+66Olvtz5/oARUTIAmXvjanIy4qtuaYri2s2G3C9 Wvbw== 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=tNveumf6gLF+whj+S74WOs+AMcNJ6TH3RasYu4WdMXY=; b=eTRuVxFb7lVxU+NOPE58b9ttNf366nJhS1ULqs41v+6Yta5wR9LXkLIHTrocjy7IPb zMr1Me7ptNdADlhrl9CQK804KQYq+CCzVWs8jN2lueXVCV24D5/BMZ709Lh7jSR7fRA7 uLelQiV2NLollYFDQWS9SOUjOZYPs1gxOM4Y7N2E9U9YZcs7JnhZxTGczeIV4II/vbXi J6oc21Dkfw11IoPJABnckcOvzvjHTAELAfSE90XTMmLTMz6KJNgtpIFEDG3Vf1IzIC7G Kmh55aONxuRCG0oZPWWGhK8oCRrHkSxCAPjtKwUe/NpZCVQ7Sb+bTztCTpBIRuQEU6pO nzWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mpx8FnQe; 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=pass (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 z11si15257543ioq.81.2021.05.24.08.37.12; Mon, 24 May 2021 08:37:25 -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=@linuxfoundation.org header.s=korg header.b=mpx8FnQe; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233800AbhEXPgv (ORCPT + 99 others); Mon, 24 May 2021 11:36:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:51614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233549AbhEXPdm (ORCPT ); Mon, 24 May 2021 11:33:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6BE7D613F8; Mon, 24 May 2021 15:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870302; bh=6N2J+bLynzneGgphcA93oJGue/OTStNqurloSqcD73I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mpx8FnQeQdmnHRuJKdqDl1t40gFVQlXA+cwUCp+3Wd831d+hLqzbTGFBY117MEWZ2 UYY6HrfGs5KXgmUxg/nruOyZCZu3PIxPn6o2JT2q4W4LETE8yE33ho/g7aI2D0xJx/ Q0YN+FnBM0e6rsMTE4HgdS29+NXmP2XXGZN1p89U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Stafford Horne , Sasha Levin Subject: [PATCH 4.9 01/36] openrisc: Fix a memory leak Date: Mon, 24 May 2021 17:24:46 +0200 Message-Id: <20210524152324.210894968@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.158146731@linuxfoundation.org> References: <20210524152324.158146731@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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: Christophe JAILLET [ Upstream commit c019d92457826bb7b2091c86f36adb5de08405f9 ] 'setup_find_cpu_node()' take a reference on the node it returns. This reference must be decremented when not needed anymore, or there will be a leak. Add the missing 'of_node_put(cpu)'. Note that 'setup_cpuinfo()' that also calls this function already has a correct 'of_node_put(cpu)' at its end. Fixes: 9d02a4283e9c ("OpenRISC: Boot code") Signed-off-by: Christophe JAILLET Signed-off-by: Stafford Horne Signed-off-by: Sasha Levin --- arch/openrisc/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c index b4ed8b36e078..e5f5b69a7b7b 100644 --- a/arch/openrisc/kernel/setup.c +++ b/arch/openrisc/kernel/setup.c @@ -278,6 +278,8 @@ void calibrate_delay(void) pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", loops_per_jiffy / (500000 / HZ), (loops_per_jiffy / (5000 / HZ)) % 100, loops_per_jiffy); + + of_node_put(cpu); } void __init setup_arch(char **cmdline_p) -- 2.30.2