From nobody Wed Apr 8 03:10:49 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 4064F3A4F30; Tue, 10 Mar 2026 17:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773164595; cv=none; b=qUcuiKrLJNe6kGqBlhYsl3db2iMNjH/NjOV1bT+wx18GP7qs7i7pQkv6e/NRfGiLpWW4EkQ4hpAeVN0lQZV9iVxcVG6EPd9BegGhDCXnmWcGSwHdFzkDrpzXg0ROKsFnM6Yum+nHqBuHMd6JqHL4K/yLle6ltzvMDWdKEZi7QAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773164595; c=relaxed/simple; bh=4QrN5LkUBZ9QRJmC1zNPo/qKgBY8MQUmCWreFgHgs2M=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=KAQOVIrzs7GoTTxyyArsR9v7Xv7aSEW6ajZYvy2l7NwSv/nV6F+EKLvOM0Vw4Mecw5xMWya6WNlfVG90f+AF218VfgT7nWrGXDJQ19acA12CO4VqAIU94MfSuRlO6Ode/7vAPWrt33b5V9xfIMGOx82ntVHC96OfL16EKa9//KI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3ygjfmvr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2o4EVHHD; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3ygjfmvr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2o4EVHHD" Date: Tue, 10 Mar 2026 17:43:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773164592; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ccLk041vms+gbIMQqNANyQt/DSC7IJR9QfWDkYEoo/0=; b=3ygjfmvrLyVxk+Sq7NWAI1ShpJ/InzEqsWbiUgRAkx9ozX4nrSOYwieXyQvdbI0NYalH5f iJGXwYUsWItUnniz+jf29xyLhRbVZ+Uu9xu25ok8rOFCgMzFUHzA7yHt3+o7AAn1vPjvXt GhCgbESkCgLSd5nuSoYIajcg7bsjLuN6dagT9rCCzSB8UzZmnIqAFO8SV2/S3e+9oOoFOJ BN5lZ52c6/ZN1rRYhiyuqS0x8Qhm1tGt0D3sOlT4/tSmg6+9rkH07IljqCJ/BoQLtK1/Zk 0wu5WsBRigqPHUTSa1B0xfQYaZ2es8NXftgq7R0XLOLcRkPCs32mcyCJ5qfmpA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773164592; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ccLk041vms+gbIMQqNANyQt/DSC7IJR9QfWDkYEoo/0=; b=2o4EVHHDutAhuWc9jO2ur/8qUdvQp+Td7cQlwoU2suX2V043cCLlHQ5Ng0tsXWzhnJ2YmI +zUtRpJgUlXyQxCA== From: "tip-bot2 for Jessica Liu" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] irqchip/riscv-aplic: Register syscore operations only once Cc: Jessica Liu , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20260310141731145xMwLsyvXl9Gw-m6A4VRYj@zte.com.cn> References: <20260310141731145xMwLsyvXl9Gw-m6A4VRYj@zte.com.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177316459134.1647592.17766218061495434688.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/urgent branch of tip: Commit-ID: b330fbfd34d7624bec62b99ad88dba2614326a19 Gitweb: https://git.kernel.org/tip/b330fbfd34d7624bec62b99ad88dba261= 4326a19 Author: Jessica Liu AuthorDate: Tue, 10 Mar 2026 14:17:31 +08:00 Committer: Thomas Gleixner CommitterDate: Tue, 10 Mar 2026 18:42:34 +01:00 irqchip/riscv-aplic: Register syscore operations only once Since commit 95a8ddde3660 ("irqchip/riscv-aplic: Preserve APLIC states across suspend/resume"), when multiple NUMA nodes exist and AIA is not configured as "none", aplic_probe() is called multiple times. This leads to register_syscore(&aplic_syscore) being invoked repeatedly, causing the following Oops: list_add double add: new=3Dffffffffb91461f0, prev=3Dffffffffb91461f0, next= =3Dffffffffb915c408. [] __list_add_valid_or_report+0x60/0xc0 [] register_syscore+0x3e/0x70 [] aplic_probe+0xc6/0x112 Fix this by registering syscore operations only once, using a static variable aplic_syscore_registered to track registration. [ tglx: Trim backtrace properly ] Fixes: 95a8ddde3660 ("irqchip/riscv-aplic: Preserve APLIC states across sus= pend/resume") Signed-off-by: Jessica Liu Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260310141731145xMwLsyvXl9Gw-m6A4VRYj@zte.c= om.cn --- drivers/irqchip/irq-riscv-aplic-main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-r= iscv-aplic-main.c index 8775f18..9f53979 100644 --- a/drivers/irqchip/irq-riscv-aplic-main.c +++ b/drivers/irqchip/irq-riscv-aplic-main.c @@ -116,6 +116,16 @@ static struct syscore aplic_syscore =3D { .ops =3D &aplic_syscore_ops, }; =20 +static bool aplic_syscore_registered __ro_after_init; + +static void aplic_syscore_init(void) +{ + if (!aplic_syscore_registered) { + register_syscore(&aplic_syscore); + aplic_syscore_registered =3D true; + } +} + static int aplic_pm_notifier(struct notifier_block *nb, unsigned long acti= on, void *data) { struct aplic_priv *priv =3D container_of(nb, struct aplic_priv, genpd_nb); @@ -379,7 +389,7 @@ static int aplic_probe(struct platform_device *pdev) return rc; } =20 - register_syscore(&aplic_syscore); + aplic_syscore_init(); =20 #ifdef CONFIG_ACPI if (!acpi_disabled)