From d4f43ea246d424219f2d67d2c5c04fcbe13d10bb Mon Sep 17 00:00:00 2001 From: zhouchengxiang Date: Thu, 17 Jul 2025 10:10:49 +0800 Subject: [PATCH] fix get file rcu compilation error --- sysmonitor-kmod.spec | 8 ++++- ...-fix-get-file-rcu-compilation-errors.patch | 34 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 update-fix-get-file-rcu-compilation-errors.patch diff --git a/sysmonitor-kmod.spec b/sysmonitor-kmod.spec index db41886..51fd6a2 100644 --- a/sysmonitor-kmod.spec +++ b/sysmonitor-kmod.spec @@ -7,7 +7,7 @@ %define kmod_name sysmonitor %define version 1.3.2 -%define releaseversion 1.7 +%define releaseversion 1.8 Summary: System Monitor Daemon Name: %{kmod_name}-kmod Version: %{version} @@ -40,6 +40,7 @@ Patch2: bugfix-fix-fd-path-failed-to-open.patch Patch3: update-support-loongarch-fix-compilation-errors.patch Patch4: add-install-section-in-src-CMakeList.txt-and-module-Makefile.patch Patch5: support-monitor-process-function-by-kprobe.patch +Patch6: update-fix-get-file-rcu-compilation-errors.patch %description System Monitor Daemon @@ -174,6 +175,11 @@ systemctl daemon-reload 2>/dev/null 1>/dev/null /usr/lib/systemd/system/multi-user.target.wants/sysmonitor.service %changelog +* Wed Jul 16 2025 zhouchengxiang - 1.3.2-1.8 +- Type:bugfix +- CVE:NA +- DESC:change get file rcu, fix compilation error + * Sun Sep 22 2024 guo-zhicheng666<1678717630@qq.com> - 1.3.2-1.7 - Type:bugfix - CVE:NA diff --git a/update-fix-get-file-rcu-compilation-errors.patch b/update-fix-get-file-rcu-compilation-errors.patch new file mode 100644 index 0000000..50b7e20 --- /dev/null +++ b/update-fix-get-file-rcu-compilation-errors.patch @@ -0,0 +1,34 @@ +From 2a1e153d3ddd285dd2e10d18567429a42f9dca93 Mon Sep 17 00:00:00 2001 +From: zhouchengxiang +Date: Thu, 17 Jul 2025 10:04:56 +0800 +Subject: [PATCH] fix get_file_rcu compilation error + +--- + module/signo_catch.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/module/signo_catch.c b/module/signo_catch.c +index f1c1e0a..856782f 100644 +--- a/module/signo_catch.c ++++ b/module/signo_catch.c +@@ -99,15 +99,12 @@ static const struct proc_ops g_proc_qemu_operations = { + /* Here introduce euler_get_mm_exe_file and euler_get_task_exe_file + * to solve the build and insmod error. + */ +-static struct file *euler_get_mm_exe_file(const struct mm_struct *mm) ++static struct file *euler_get_mm_exe_file(struct mm_struct *mm) + { + struct file *exe_file = NULL; + + rcu_read_lock(); +- exe_file = rcu_dereference(mm->exe_file); +- if (exe_file && !get_file_rcu(exe_file)) { +- exe_file = NULL; +- } ++ exe_file = get_file_rcu(&mm->exe_file); + rcu_read_unlock(); + return exe_file; + } +-- +2.47.0.windows.2 + -- Gitee