Fix cpu isolate errors when some cpus are offline before the service started
This commit is contained in:
parent
2ad1ed03e5
commit
be4fee4058
32
bugfix-fix-cpu-isolate-errors-when-some-cpus-are-.patch
Normal file
32
bugfix-fix-cpu-isolate-errors-when-some-cpus-are-.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 77600e0cd71cd5c34126635b199e7b66f4d74874 Mon Sep 17 00:00:00 2001
|
||||
From: Shengwei Luo <luoshengwei@huawei.com>
|
||||
Date: Tue, 23 Apr 2024 17:09:10 +0800
|
||||
Subject: [PATCH] rasdaemon: Fix cpu isolate errors when some cpus are offline
|
||||
before the service started.
|
||||
|
||||
The upstream patch use (sysconf(_SC_NPROCESSORS_ONLN)) instead of
|
||||
(sysconf(_SC_NPROCESSORS_CONF)). However ras_cpu_isolation_init()
|
||||
need the all cpu info, so fix it.
|
||||
|
||||
Fixes: f1ea76375281 ("rasdaemon: Check CPUs online, not configured")
|
||||
Signed-off-by: Shengwei Luo <luoshengwei@huawei.com>
|
||||
---
|
||||
ras-events.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ras-events.c b/ras-events.c
|
||||
index ffac02b..1aa6db6 100644
|
||||
--- a/ras-events.c
|
||||
+++ b/ras-events.c
|
||||
@@ -950,7 +950,7 @@ int handle_ras_events(int record_events)
|
||||
cpus = get_num_cpus(ras);
|
||||
|
||||
#ifdef HAVE_CPU_FAULT_ISOLATION
|
||||
- ras_cpu_isolation_init(cpus);
|
||||
+ ras_cpu_isolation_init(sysconf(_SC_NPROCESSORS_CONF));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MCE
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: rasdaemon
|
||||
Version: 0.8.0
|
||||
Release: 3
|
||||
Release: 4
|
||||
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
|
||||
@ -32,6 +32,7 @@ Patch9005: 0002-rasdaemon-fix-issue-of-signed-and-unsigned-integer-c.patch
|
||||
Patch9006: 0003-rasdaemon-Add-support-for-creating-the-vendor-error-.patch
|
||||
Patch9007: backport-Check-CPUs-online-not-configured.patch
|
||||
Patch9008: backport-rasdaemon-diskerror-fix-incomplete-diskerror-log.patch
|
||||
Patch9009: bugfix-fix-cpu-isolate-errors-when-some-cpus-are-.patch
|
||||
|
||||
%description
|
||||
The rasdaemon program is a daemon which monitors the platform
|
||||
@ -83,6 +84,13 @@ fi
|
||||
/usr/bin/systemctl disable rasdaemon.service >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Tue Apr 23 2024 luoshengwei <luoshengwei@huawei.com> - 0.8.0-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix cpu isolate errors when some cpus are offline
|
||||
before the service started
|
||||
|
||||
* Wed Mar 27 2024 zhuofeng <zhuofeng2@huawei.com> - 0.8.0-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user