From 4d08ad76c9ad3fb84138d037ab4586db02c723d1 Mon Sep 17 00:00:00 2001 From: "Aleksinski, MichalX" Date: Wed, 6 Mar 2019 13:50:17 +0000 Subject: [PATCH] intel_rdt: Added check if name group is defined before updating of pids list Change-Id: Ic99acd51be69d2678f25bdde9ca37011ad24fe99 --- src/intel_rdt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/intel_rdt.c b/src/intel_rdt.c index 5e8f9809..422d05de 100644 --- a/src/intel_rdt.c +++ b/src/intel_rdt.c @@ -864,10 +864,12 @@ static void rdt_init_pids_monitoring() { g_rdt->num_proc_pids += ng->num_names; } - int update_result = - proc_pids_update(RDT_PROC_PATH, g_rdt->proc_pids, g_rdt->num_proc_pids); - if (0 != update_result) - ERROR(RDT_PLUGIN ": Initial update of proc pids failed"); + if (g_rdt->num_ngroups > 0) { + int update_result = + proc_pids_update(RDT_PROC_PATH, g_rdt->proc_pids, g_rdt->num_proc_pids); + if (0 != update_result) + ERROR(RDT_PLUGIN ": Initial update of proc pids failed"); + } for (size_t group_idx = 0; group_idx < g_rdt->num_ngroups; group_idx++) { int refresh_result = rdt_refresh_ngroup(&(g_rdt->ngroups[group_idx]), -- 2.11.0