Projects
Eulaceura:Mainline:GA
dim
_service:obs_scm:backport-Fix-NULL-pointer-refe...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-Fix-NULL-pointer-reference-when-kill-child-processes.patch of Package dim
From a8ce34c0c661683fe33ef79be2b5b6819d4adfde Mon Sep 17 00:00:00 2001 From: jinlun <jinlun@huawei.com> Date: Mon, 17 Jun 2024 14:54:40 +0800 Subject: [PATCH 02/14] Fix NULL pointer reference when kill child processes --- .../tasks/dim_core_measure_process/dim_core_measure_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/tasks/dim_core_measure_process/dim_core_measure_process.c b/src/core/tasks/dim_core_measure_process/dim_core_measure_process.c index e5e262a..c1efa02 100644 --- a/src/core/tasks/dim_core_measure_process/dim_core_measure_process.c +++ b/src/core/tasks/dim_core_measure_process/dim_core_measure_process.c @@ -89,8 +89,8 @@ static int kill_task_tree(struct task_struct *tsk) return -ENOMEM; dim_core_kernel_symbol.walk_process_tree(tsk, store_task_tree, &ctx); - if (ctx.len != 0) { - for (i = ctx.len; i >= 0; i--) { + if (ctx.len > 0) { + for (i = ctx.len - 1; i >= 0; i--) { send_sig(SIGKILL, ctx.buf[i], 1); put_task_struct(ctx.buf[i]); } -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2