From nobody Tue Jun 9 00:59:03 2026 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 725262D6409 for ; Mon, 25 May 2026 03:13:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779678798; cv=none; b=qZQsJ07+7nCfKBH0WRz9nWEVMhv8J81lYV7bRyWO6LegSCO1EYx5TFyi8R0OfNx/W7dA1qJS96tOmyap6jrzRA68b6v1wHgwGeMYMpPoEDW5KoRd590873HEUv2rG8BHvWHJptmMfp7Te68a48x9Rht7uZUp9B3qsT1gRBwdQx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779678798; c=relaxed/simple; bh=pdBcRnBJqP4Oo1zmzX0TAYNnDnUVaUAhd0pErfRjWwE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nD23wU2pw+ixacDHRw4HS8DGu5nfNpkwsE2lfzzQ6xXUrcJ4ly0HDU1De91LPJadWCxMvXQI9f+R+tQ7OJM1JwnQAMhfaHbBGMOuQrpb+zcJR3F+FwHdBb9W6ftQlbErhntEtSLPBzamhTT2FD2xPgvnep7iL871DNV9Wh2jOQM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=n4ori7n/; arc=none smtp.client-ip=209.85.160.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="n4ori7n/" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-5165195c8b0so102242241cf.0 for ; Sun, 24 May 2026 20:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779678796; x=1780283596; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7LePE+lQEDtbUjTwqwb7DITUL2X+56pGvmOXgAAh314=; b=n4ori7n/Xu/5v4Hugss6ru2j0l/VrfJ0Nkmx+TRfXIu8M17NWqQCg4e8pewTW/Gz4C xW8m8hkRUVcG7gpCck5ELRDcZjMfhy98O8S1FYqqwiB68aNXYmMRJi/6yuf8lyX6etFb bTHl5J/zqvqoEdI7OQtnyhO2unB2yGr1Dla1xa2PeJz0ur9YdBzvpqm4pmqVjpNB/uQ2 lXtoUHFCCN5jysb0Yya5pjRUBOA07z9oD1V1viIWZb4wFr2U8clMQR3XBvJiORMu9XB6 TfMCnQAdkI1Xif/V+BcMcNXbSkRjmEFUcKoA0dBD6iq/Nvh0C2UKEVqZtiZrichD57v9 knSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779678796; x=1780283596; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7LePE+lQEDtbUjTwqwb7DITUL2X+56pGvmOXgAAh314=; b=gGW5RU0MdNNkhhHVJaDScX1hIujsTAfv57vD0+1dd2PHsGLAhz86iEa67VAqmbykyN xdvoUh7FWdjQpAgQpVRkCmVbXTBL0Jz3LdbSMW/SKUqDKX1WPdFJSnh1WjcJ66dYrJ9r 5UqxHxH7oXE5MdV9P9H1R3nL67eZlaCmxuzwRoHTdqpGzKuFjTBakvl6Ue5kt/dVo5pt iAFY5wM5HJJEVR/DA4dQmKOBTU5SiF5EDeuxkXeBHdP8+bzzGoAg1eAat7i3hmps0XTo yxk+/nIQuVYa/lA8Z4thSZ0K7AZ2/N5/wt/GG+HeGuoJoOQ+6odGWp1Pgv/yYBdD7RWc Ag6A== X-Forwarded-Encrypted: i=1; AFNElJ+vOMMvGg+VZ2YLA9LP7dgF1cCJXJtw8HJlP8r9daXBGI+nhCRje7ab7uLtaJJrUp3f8bm3TLxAz9h0qyo=@vger.kernel.org X-Gm-Message-State: AOJu0YzaxzlqndhoALwewdsWizzsXECEqVAnWv9VWiCR9M3MdwbKLsCi hXXxFqHDfm5/vvsuydnxWsRwatjDvRw3LgE2ijU6IQ9pscf2qHXJBHBG X-Gm-Gg: Acq92OHzLAwQrd2iMWNx8StTWxtRvRVwPf4NG28sqGKqBSjw1TXDePaQXWCleeEhBYY O7Qd9toPHuSeGcaRYAM4dK11VVFlSjK0vqgy1S8ULozin3Htp0SQDcqj7Uhac0Y8RK3K77lVNkJ 5tfHsHt8Bcg+hC0ZyxChrERyfGHGirZDcICQd8vgYf5pJE+EatdAPJL0eRnwl7OtyckXX9d1298 GkdXJV95Ihd3IzzaksGkrFEe7L81/LoT/RcbHhbng/GbSuKhZesfcItjrxdquz14PgQwus6TEh/ 05jlOhJGvvMQCxIxF8GqfvzQEDn9ZRoV0Iw+s32aIN7gWHwxTan48PYThAXVzuAr/cK4P7C4tJp g6KVaM2O0sxRpiiZQbbavSk8Lo8XRQ1m/BP7OiaUs+vAnEE87dBaWg7NXBzNDIz8DnKE/Yvs8Jb DcC59DGUI4eO5vWyGKLv+tdMOOnzFaFp+QZBOrSYRiN5nR17SHPFE= X-Received: by 2002:a05:622a:5a0a:b0:516:dcbd:aabb with SMTP id d75a77b69052e-516dcbe03ddmr147747701cf.16.1779678796278; Sun, 24 May 2026 20:13:16 -0700 (PDT) Received: from i4-gl-tmk5904.ad.psu.edu ([130.203.156.186]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-516d8cb8faasm80335381cf.21.2026.05.24.20.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2026 20:13:15 -0700 (PDT) From: Yuho Choi To: Andre Przywara , Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yuho Choi Subject: [PATCH v1] ARM: highbank: Fix OF node refcount leaks Date: Sun, 24 May 2026 23:13:12 -0400 Message-ID: <20260525031312.1341109-1-dbgh9129@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" highbank_init_irq() checks for a Cortex-A9 node with of_find_compatible_node(), but uses the returned node only as a boolean and drops the pointer without releasing the reference. highbank_init() has the same issue for the Calxeda system registers node after mapping it with of_iomap(). of_iomap() does not consume the device node reference. Release both node references after the corresponding use. Fixes: 7a2848d369b2 ("ARM: highbank: abstract out SCU usage") Fixes: 26cae166cff9 ("ARM: highbank: remove custom .init_time hook") Signed-off-by: Yuho Choi --- arch/arm/mach-highbank/highbank.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/hig= hbank.c index 47335c7dadf8..430f1ca125d3 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -50,10 +50,15 @@ static void highbank_l2c310_write_sec(unsigned long val= , unsigned reg) =20 static void __init highbank_init_irq(void) { + struct device_node *np; + irqchip_init(); =20 - if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) + np =3D of_find_compatible_node(NULL, NULL, "arm,cortex-a9"); + if (np) { + of_node_put(np); highbank_scu_map_io(); + } } =20 static void highbank_power_off(void) @@ -141,6 +146,7 @@ static void __init highbank_init(void) /* Map system registers */ np =3D of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); sregs_base =3D of_iomap(np, 0); + of_node_put(np); WARN_ON(!sregs_base); =20 register_platform_power_off(highbank_power_off); --=20 2.43.0