Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CB6D376A06; Tue, 21 Jul 2026 17:05:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784653508; cv=none; b=puOzHUW1gYETulIwM/wDsSHVODc4zokW+WFsaCTwV9srukUuaVJgCgoipkf8PZ7jq5XiEw3K+n7/NUazqtxnakjviY6wMrx070QR9dw+zKTqQ0efzFUYrinyimUdnxYr/LafBZMLEatOQgjMTIRS0yvjrDOUHMymiA6NSAHAe0M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784653508; c=relaxed/simple; bh=iT98nd22FB4y0M7B2d4fETGEaxrbcJCK39QyR/88v/o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D1ohxFkGDaBVHORMTQ+yFdNYTTw9S0d+x8QLAwcR9AleC7OqU06O734o7vrx7hgwVchhdznE3JdSlQx60kfMI/G64vC5nYtawrRFX48kj5BumF3gJIBNkaeX5aZ4rNZAtMXak/YaviXl+gJyYK4ycjcEk4+WY5MtOr7uA4v/r18= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1toK19Wy; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1toK19Wy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93EEB1F000E9; Tue, 21 Jul 2026 17:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784653507; bh=yBWDOWpblon7moqfOqBUZE8C8WvaWwUigAcdaPgoBkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1toK19WykTDe5FuMfkjv4zT5mT+YJonE4bIDmQQ/EqlI2NTVkpsPjYOP251KShCmu 4Mz507BsFMRm70uslIbM4J7sx5R7RzCvwoD15Ykcu5S/K8ckfDV3WC945Jjo3ht0ZC 84WTnvcxCKs6sOSf4NsTE6BAmUEO5vlnvYY0yTmU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuho Choi , Thomas Gleixner , "Zenghui Yu (Huawei)" , Marc Zyngier , Sasha Levin Subject: [PATCH 7.1 1354/2077] irqchip/gic-v3-its: Fix OF node reference leak Date: Tue, 21 Jul 2026 17:17:07 +0200 Message-ID: <20260721152624.753395440@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuho Choi [ Upstream commit 2e1368a9d61bdf5502ddade004f223a5831c5b8c ] of_get_cpu_node() returns a referenced device node. In its_cpu_init_collection(), the Cavium 23144 workaround only uses the node to compare the CPU NUMA node, but the reference is never dropped. Use the device_node cleanup helper for the CPU node reference so it is released when leaving the workaround block, including the NUMA mismatch return path. Fixes: fbf8f40e1658 ("irqchip/gicv3-its: numa: Enable workaround for Cavium thunderx erratum 23144") Signed-off-by: Yuho Choi Signed-off-by: Thomas Gleixner Reviewed-by: Zenghui Yu (Huawei) Acked-by: Marc Zyngier Signed-off-by: Sasha Levin --- drivers/irqchip/irq-gic-v3-its.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 291d7668cc8daf..5f9f58ff758cc8 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -3290,11 +3290,9 @@ static void its_cpu_init_collection(struct its_node *its) /* avoid cross node collections and its mapping */ if (its->flags & ITS_FLAGS_WORKAROUND_CAVIUM_23144) { - struct device_node *cpu_node; + struct device_node *cpu_node __free(device_node) = of_get_cpu_node(cpu, NULL); - cpu_node = of_get_cpu_node(cpu, NULL); - if (its->numa_node != NUMA_NO_NODE && - its->numa_node != of_node_to_nid(cpu_node)) + if (its->numa_node != NUMA_NO_NODE && its->numa_node != of_node_to_nid(cpu_node)) return; } -- 2.53.0