!118 回合上游补丁
From: @pshysimon Reviewed-by: @lvying6 Signed-off-by: @lvying6
This commit is contained in:
commit
cdb327bf13
38
0001-Check-CPUs-online-not-configured.patch
Normal file
38
0001-Check-CPUs-online-not-configured.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From f1ea76375281001cdf4a048c1a4a24d86c6fbe48 Mon Sep 17 00:00:00 2001
|
||||
From: Zeph / Liz Loss-Cutler-Hull <warp-spam_git@aehallh.com>
|
||||
Date: Sun, 9 Jul 2023 04:57:19 -0700
|
||||
Subject: [PATCH] Check CPUs online, not configured.
|
||||
|
||||
When the number of CPUs detected is greater than the number of CPUs in
|
||||
the system, rasdaemon will crash when it receives some events.
|
||||
|
||||
Looking deeper, we also fail to use the poll method for similar reasons
|
||||
in this case.
|
||||
|
||||
All of this can be prevented by checking to see how many CPUs are
|
||||
currently online (sysconf(_SC_NPROCESSORS_ONLN)) instead of how many
|
||||
CPUs the current kernel was configured to support
|
||||
(sysconf(_SC_NPROCESSORS_CONF)).
|
||||
|
||||
For the kernel side of the discussion, see https://lore.kernel.org/lkml/CAM6Wdxft33zLeeXHhmNX5jyJtfGTLiwkQSApc=10fqf+rQh9DA@mail.gmail.com/T/
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
||||
---
|
||||
ras-events.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ras-events.c b/ras-events.c
|
||||
index a82dab2..5935163 100644
|
||||
--- a/ras-events.c
|
||||
+++ b/ras-events.c
|
||||
@@ -350,7 +350,7 @@ static void parse_ras_data(struct pthread_data *pdata, struct kbuffer *kbuf,
|
||||
|
||||
static int get_num_cpus(struct ras_events *ras)
|
||||
{
|
||||
- return sysconf(_SC_NPROCESSORS_CONF);
|
||||
+ return sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#if 0
|
||||
char fname[MAX_PATH + 1];
|
||||
int num_cpus = 0;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: rasdaemon
|
||||
Version: 0.6.7
|
||||
Release: 15
|
||||
Release: 16
|
||||
License: GPLv2
|
||||
Summary: Utility to get Platform Reliability, Availability and Serviceability (RAS) reports via the Kernel tracing events
|
||||
URL: https://github.com/mchehab/rasdaemon.git
|
||||
@ -39,6 +39,7 @@ Patch17: 0009-rasdaemon-ras-mc-ctl-Updated-HiSilicon-platform-name.patch
|
||||
Patch18: 0010-rasdaemon-Fix-for-a-memory-out-of-bounds-issue-and-o.patch
|
||||
Patch19: 0001-rasdaemon-use-standard-length-PATH_MAX-for-path-name.patch
|
||||
Patch20: rasdaemon-diskerror-fix-incomplete-diskerror-log.patch
|
||||
Patch21: 0001-Check-CPUs-online-not-configured.patch
|
||||
|
||||
Patch6000: backport-rasdaemon-ras-mc-ctl-Fix-script-to-parse-dimm-sizes.patch
|
||||
Patch6001: backport-rasdaemon-ras-memory-failure-handler-handle-localtim.patch
|
||||
@ -105,6 +106,12 @@ fi
|
||||
/usr/bin/systemctl disable rasdaemon.service >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Wed Dec 20 2023 caixiaomeng <caixiaomeng2@huawei.com> - 0.6.7-16
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:backport upstream patches
|
||||
|
||||
* Wed Nov 29 2023 renhongxun <renhongxun@h-partners.com> - 0.6.7-15
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user