From patchwork Mon Aug 26 05:49:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13777103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C403C5321D for ; Mon, 26 Aug 2024 05:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=r2i8zaE0YtzEZow2QdSxGHYtA7tYlYZ9iUN/peY1qCA=; b=upHzPBPlbtPQ/UE7R/Xt+N88N8 /bRWiiveJmKFD7dtJRK6yeiSdcsZ2mJ4s7/WNGn8eiqqBdFddbgXW51ITsRFlLNPmZ4tHKoZXaAEA /dq2gF/2Jfub1lP24r5wBmKT75PkGkFbZ1g0vlNSWzkNP0hInPkuRO2Wx6EytTFXmQ1rb8+RtgZRj dEoQas0o+TyjAQo/Aiw8maAD+bsgypQwko2wYjDXbOpLxaKer51qhwlsSTJPZrrJ9R4ZsoyJoScoT O+iSQ3Q24Sp4VjrO6oEDzPwbUZH+sqZ9AgzD3xszCOLu9R9QYQ43TeeTi5vmh6eeCnboOPVfjy2gS txylhWpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siScc-00000005vRH-1tPR; Mon, 26 Aug 2024 05:50:34 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siSbp-00000005vIo-0cSB for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 05:49:46 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4281ddd3ae8so1534165e9.2 for ; Sun, 25 Aug 2024 22:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724651383; x=1725256183; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=r2i8zaE0YtzEZow2QdSxGHYtA7tYlYZ9iUN/peY1qCA=; b=li94LkPpsQnWHpSbAerzO9W8kGnXiMkJdI8TmE6gM1IUXxRaXSntcyhL8CZ224FP4d 3rLawuKWT20XoTa9Hha+4VDEHBB3e2Tpca+aJhJseotXgxdQhVQwk12GzQmAv5etsAyg D7PKk6bVkHPq9ETxUMl9ZfeB5x7+dQRhKqyrVUFcGh+cRJtZdc0nU6qsmZqHGmoN5NRJ DeCGpfqFM3s+PWpc/Jv1iD0J7du9GcUnSxfwjAHRopZbziVr5LfedplIh97LQR8WwY6G qWC0wKuHtTjzDXAe8DV61FDMS4CaktOVei18vKHk4anDoyms6A1Jee5O/lilGMHibOst fR5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724651383; x=1725256183; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=r2i8zaE0YtzEZow2QdSxGHYtA7tYlYZ9iUN/peY1qCA=; b=QSGPVosnW9oRQKhScnuHH2v+bK5Z8P+ZK339HnarLNcAtsZwKHpOo2PmOqKOIaXeHr fglOnnYSNYhoivw9C+WdjVygdg5++ezDdv/bvYJ1IyEEYbRLbmVGI+wUKvyO97h5VO/V 0GAYxNADmUAuk64CtIb8mEafkVNfo9xPJC81sHIL6i2SGYszxDM98lwSum4j/Q6NenXc F/6QtoTR8DbMwNEKezKNRM/sSeKc4W9iQWC4oZv4YftOcdaKCnmJt6sXk4v9pF1wYCFl mH+524DgcVweLm+frs0joWXtoa01X73LfH/s1WBiQ4SsQZmx0IRChWTJVkAOdP0SD2Y7 ANUQ== X-Forwarded-Encrypted: i=1; AJvYcCWzkDSHSepJtFpqn2aMUIrNpInBht8co7fky0Brs8OLu4TT9ORzkPRY9CYnNj+10f9zIxvMO+LTuFDUDYnsk5ee@lists.infradead.org X-Gm-Message-State: AOJu0YzPPaO2N5U5vrFj/lBknr+FsVdHU/FMHRrACUFPRnrSEx9VsmgU 5g4+SFtfy6resAcs3yXAe9KplmA4v3tjA7wUwnx6USkWrYdB3E+G9vu9FR2Kbvk= X-Google-Smtp-Source: AGHT+IHE6P4oD3s3P8wsBrvk15qfQgG2eaRUaX3kBBUATpxHS5epKJAsXSqueKmZp/eKXkCcEt0ANA== X-Received: by 2002:a5d:5f48:0:b0:35f:2584:76e9 with SMTP id ffacd0b85a97d-37311852317mr3885621f8f.2.1724651383043; Sun, 25 Aug 2024 22:49:43 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.82]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42abee8d1c9sm177632025e9.23.2024.08.25.22.49.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 22:49:42 -0700 (PDT) From: Krzysztof Kozlowski To: Linus Walleij , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Date: Mon, 26 Aug 2024 07:49:33 +0200 Message-ID: <20240826054934.10724-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240825_224945_238112_ED092680 X-CRM114-Status: GOOD ( 11.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Machine code is leaking OF node reference from of_find_matching_node() in realview_smp_prepare_cpus(). Fixes: 5420b4b15617 ("ARM: realview: add an DT SMP boot method") Signed-off-by: Krzysztof Kozlowski Acked-by: Liviu Dudau --- Not Cc-ing stable as this should have almost no impact, except code correctness. --- arch/arm/mach-versatile/platsmp-realview.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-versatile/platsmp-realview.c b/arch/arm/mach-versatile/platsmp-realview.c index 6965a1de727b..d38b2e174257 100644 --- a/arch/arm/mach-versatile/platsmp-realview.c +++ b/arch/arm/mach-versatile/platsmp-realview.c @@ -70,6 +70,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus) return; } map = syscon_node_to_regmap(np); + of_node_put(np); if (IS_ERR(map)) { pr_err("PLATSMP: No syscon regmap\n"); return;