Compare commits

...
Author SHA1 Message Date
openeuler-ci-bot 0fdd6cfe58 !165 [sync] PR-162: use patch command to apply patches for consistency in context
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-06-17 05:52:15 +00:00
wangxiao65 77f05d07a1 use patch command to apply patches for consistency in context
(cherry picked from commit 6b2a64b805)
2025-06-13 10:05:48 +08:00
openeuler-ci-bot 3112976347 !163 [sync] PR-161: fix ps error when mm_struct.rss_stat is not initialized
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-06-06 08:46:22 +00:00
zhangjian 102c7d7849 fix ps error when mm_struct.rss_stat is not initialized
Signed-off-by: zhangjian <zhangjian496@huawei.com>
(cherry picked from commit bc29223016)
2025-06-05 15:40:17 +08:00
2 changed files with 39 additions and 6 deletions
+11 -6
View File
@@ -1,6 +1,6 @@
Name: crash
Version: 8.0.5
Release: 6
Release: 8
Summary: Linux kernel crash utility.
License: GPLv3
URL: https://crash-utility.github.io
@@ -9,14 +9,11 @@ Source1: http://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.gz
Patch0: 0000-lzo_snappy.patch
Patch1: 0001-add-SDEI-stack-resolution.patch
## %ifarch sw_64
Patch2: 0002-crash-8.0.2-sw.patch
## %endif
## %ifarch loongarch64
Patch3: 0003-crash-8.0.4-add-support-for-loongarch64.patch
## %endif
Patch4: 0004-arm64-fix-a-potential-segfault-when-unwind-frame.patch
Patch5: 0005-arm64-fix-SDEI-stack-frame-unwind-while-UNW_4_14-is-.patch
Patch9001: huawei-fix-ps-error-when-mm_struct.rss_stat-is-lazy-initial.patch
BuildRequires: ncurses-devel zlib-devel lzo-devel snappy-devel texinfo libzstd-devel
BuildRequires: gcc gcc-c++ bison m4
@@ -59,7 +56,9 @@ created by manufacturer-specific firmware.
%patch 3 -p1
%endif
%autopatch -m4 -p1
%patch 4 -p1
%patch 5 -p1
%patch 9001 -p1
%build
cp %{SOURCE1} .
@@ -94,6 +93,12 @@ install -D -m 0644 defs.h %{buildroot}%{_includedir}/%{name}/defs.h
%{_mandir}/man8/crash.8*
%changelog
* Wed Jun 04 2025 wangxiao <wangxiao184@h-partners.com> - 8.0.5-8
- use patch command to apply patches for consistency in context
* Wed May 21 2025 zhangjian <zhangjian496@huawei.com> - 8.0.5-7
- fix ps error when mm_struct.rss_stat is lazy initialized
* Wed Dec 04 2024 yangzhenyu <dev11101@linx-info.com> - 8.0.5-6
- remove the architecture judgment in the patches section;
- include all patches in the source package.
@@ -0,0 +1,28 @@
From 45052609f61d5d4ee8286d0d6098e53ea6b199a9 Mon Sep 17 00:00:00 2001
From: zhangjian <zhangjian496@huawei.com>
Date: Wed, 21 May 2025 02:08:12 +0000
Subject: [PATCH] tmp
---
tools.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools.c b/tools.c
index 0f2db10..727a12c 100644
--- a/tools.c
+++ b/tools.c
@@ -6955,6 +6955,11 @@ percpu_counter_sum_positive(ulong fbc)
readmem(fbc + OFFSET(percpu_counter_counters), KVADDR, &addr,
sizeof(void *), "percpu_counter.counters", FAULT_ON_ERROR);
+ /* maybe mm_struct.rss_stat is lazy initialized */
+ if (!addr) {
+ return ret;
+ }
+
for (i = 0; i < kt->cpus; i++) {
readmem(addr + kt->__per_cpu_offset[i], KVADDR, &count,
sizeof(int), "percpu_counter.counters count", FAULT_ON_ERROR);
--
2.33.0