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 AE8AF23BD03; Sat, 12 Sep 2026 14:48:37 +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=1789224518; cv=none; b=WxUY30cXC5Zt6hquS+En0NQ60Q+sI0mnU7z5Jv1P8/GcLNkSW+EddGLPIJad2+DSlHP0KCkArUuI0spAN4pfANJ+I34izen0lFnzxCAfhxlUhiN7t8LkND+z4BlbMLPY9uqDgZZ27KxKiwLRsaKBY0N8agPMT3bPJH2YNoHdC9E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789224518; c=relaxed/simple; bh=/yx72plrids443qvwOOFxk+Dxa01i0LsI/HHpFi48Aw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fxWP/KNCST8XAZv9ag23Uf7zsC8iguq+con/1eoUTG01Hy1nzZJLXZW9DaUmQaUUXI7OWUrVF1MDk8dn+Lq4duV3HzLOUwVZ/M1KPhz5v9GOIgYUJ+rfcdkxWJjeyYCQ3J/a/vZAQVbJAcVa2azSdhBD06+ep4006lNmp2XaVJc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aDetnv1p; 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="aDetnv1p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6782D1F000FF; Sat, 12 Sep 2026 14:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789224517; bh=kQ4Y3jzq0k4s++3WafsjKUKLkczSzlhokf4FF8vVNXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aDetnv1pYr24jR7zTo9gjhGxB1VxsUEHGTCW0VrmuvBoYSHxO7MGiNQTCFpDUPGQd txbpEEaidK56fYpoLDx8fskam0EDw4Ljsf0OJf1gBUJfK6YRz6oRG8C79Q0UvSOXFP b1dhc5vSTZ0UZUHnoI87Dz0b8XbJsMKx3QdRUDho= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Gou Hao , jiazhenyuan , Madhavan Srinivasan , Sasha Levin Subject: [PATCH 6.6 1010/1424] powerpc/smp: add NULL guard for cause_ipi in smp_muxed_ipi_message_pass Date: Sat, 12 Sep 2026 08:57:22 +0200 Message-ID: <20260912065629.929605457@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@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 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gou Hao [ Upstream commit 5aabc192702defb8950e7c81b05c3f4ca8ee43ec ] smp_muxed_ipi_message_pass() calls smp_ops->cause_ipi() without checking whether it has been set. On platforms using muxed IPI (e.g. powernv/pseries), smp_ops->cause_ipi is initialized to NULL in the static smp_ops and only assigned during the platform smp_probe() handler. If the IPI subsystem fails to initialize -- for example when xive_init_ipis() fails and xive_smp_probe() returns an error -- the probe handler returns early and cause_ipi is never set. Any subsequent IPI send (e.g. arch_smp_send_reschedule()) would dereference the NULL pointer. Add a NULL check to avoid the crash in that situation. Fixes: 23d72bfd8f9f ("powerpc: Consolidate ipi message mux and demux") Signed-off-by: Gou Hao Reviewed-by: jiazhenyuan Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20260727104215.184786-6-gouhao@uniontech.com Signed-off-by: Sasha Levin --- arch/powerpc/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index ab99a3e7f9972..0bcc6056b9e50 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -297,6 +297,9 @@ void smp_muxed_ipi_set_message(int cpu, int msg) void smp_muxed_ipi_message_pass(int cpu, int msg) { + if (!smp_ops->cause_ipi) + return; + smp_muxed_ipi_set_message(cpu, msg); /* -- 2.53.0