Received: from n169-110.mail.139.com (n169-110.mail.139.com [120.232.169.110]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D46319CC14 for ; Thu, 12 Feb 2026 06:39:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=120.232.169.110 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770878364; cv=none; b=ruEsh7RGHrG1LNVKxPiyyFz+TjT1kTuSDAJAzP+9kE4FH21EbtW57RBUpuCYhPqucvxgq0w7IdkbHnNTvBCPNROzfNd6riiNTAi/T+tjTGPktaNwERrS+4wg1k0vvfjGPTPcDSp6vrPVzDR8Sjk0Hl3Vc8ar1o6NffPC3rdzUBE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770878364; c=relaxed/simple; bh=O34gZIYg49kZyNPTCzXcE+jPWhdJA8mJFoL0W1Dbogw=; h=From:To:Subject:Date:Message-Id; b=Jug36oZwed+2UQUuosx08c2Z50/OKBWbxNDgh2w0e5Nz8gABSEubd824cF+OjjtnB5PFnGrD49N/n2QI/AYw6U9uRqjF/wmwN7d8JKi21MNdNkA0JdTv08rDDSMYi1+6/qHCulbcUC/KffClZu8xpQ1FKh+Oaz1K4pqjwxQQnA0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=139.com; spf=pass smtp.mailfrom=139.com; dkim=pass (1024-bit key) header.d=139.com header.i=@139.com header.b=CPrBsPfL; arc=none smtp.client-ip=120.232.169.110 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=139.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=139.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=139.com header.i=@139.com header.b="CPrBsPfL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=139.com; s=dkim; l=0; h=from:subject:message-id:to; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=CPrBsPfLjaduzZXUZjp1eByIv6Rl7QKWRXtU15MNusDfg3Btn9J7fxfMI21ppJ3cJm3mLh/+JsVrn SC99vzeExEQDStWXEzHPduUVF54JvSOyaccRKH6/d1c+xwN0J2o+YFgo4P1qZFlZOa/whpw/ba9GNg D6hVk+sVOLaUP01s= X-RM-TagInfo: emlType=0 X-RM-SPAM: X-RM-SPAM-FLAG:00000000 Received:from NTT-kernel-dev (unknown[117.129.7.232]) by rmsmtp-lg-appmail-09-12087 (RichMail) with SMTP id 2f37698d74d6bad-96254; Thu, 12 Feb 2026 14:36:08 +0800 (CST) X-RM-TRANSID:2f37698d74d6bad-96254 From: Rajani Kantha <681739313@139.com> To: xueshuai@linux.alibaba.com, jarkko@kernel.org, Jonathan.Cameron@huawei.com, yazen.ghannam@amd.com, jane.chu@oracle.com, guohanjun@huawei.com, stable@vger.kernel.org Subject: [PATCH 6.1.y] ACPI: APEI: send SIGBUS to current task if synchronous memory error not recovered Date: Thu, 12 Feb 2026 14:36:05 +0800 Message-Id: <20260212063605.2284-1-681739313@139.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Shuai Xue [ Upstream commit 79a5ae3c4c5eb7e38e0ebe4d6bf602d296080060 ] If a synchronous error is detected as a result of user-space process triggering a 2-bit uncorrected error, the CPU will take a synchronous error exception such as Synchronous External Abort (SEA) on Arm64. The kernel will queue a memory_failure() work which poisons the related page, unmaps the page, and then sends a SIGBUS to the process, so that a system wide panic can be avoided. However, no memory_failure() work will be queued when abnormal synchronous errors occur. These errors can include situations like invalid PA, unexpected severity, no memory failure config support, invalid GUID section, etc. In such a case, the user-space process will trigger SEA again. This loop can potentially exceed the platform firmware threshold or even trigger a kernel hard lockup, leading to a system reboot. Fix it by performing a force kill if no memory_failure() work is queued for synchronous errors. Signed-off-by: Shuai Xue Reviewed-by: Jarkko Sakkinen Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam Reviewed-by: Jane Chu Reviewed-by: Hanjun Guo Link: https://patch.msgid.link/20250714114212.31660-2-xueshuai@linux.alibaba.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki [ Using pr_err instead of dev_err due to ghes doesn't have member "dev"] Signed-off-by: Rajani Kantha <681739313@139.com> --- drivers/acpi/apei/ghes.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 03344c273222..9fb86d0c4ff0 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -684,6 +684,16 @@ static bool ghes_do_proc(struct ghes *ghes, } } + /* + * If no memory failure work is queued for abnormal synchronous + * errors, do a force kill. + */ + if (sync && !queued) { + pr_err(GHES_PFX "%s:%d: synchronous unrecoverable error (SIGBUS)\n", + current->comm, task_pid_nr(current)); + force_sig(SIGBUS); + } + return queued; } -- 2.17.1