From 12f899171da9cc06f84a29ed074f11e0285c507a Mon Sep 17 00:00:00 2001 From: Dongwoo Lee Date: Mon, 21 Feb 2022 16:22:01 +0900 Subject: [PATCH] resource: process: Handle pid, tgid into parsing nla types To prevent pid, tgid is considered error case, add handling of them. Change-Id: I3ef127312e860f8bf625a8427d5e40cfb68196cc Signed-off-by: Dongwoo Lee --- src/resource/resource-process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/resource/resource-process.c b/src/resource/resource-process.c index acdb542..aff58e1 100644 --- a/src/resource/resource-process.c +++ b/src/resource/resource-process.c @@ -234,6 +234,9 @@ static int parse_aggregate_task_stats(struct nlattr *attr, int attr_size, { nla_for_each_attr(attr, attr, attr_size, attr_size) { switch (attr->nla_type) { + case TASKSTATS_TYPE_PID: + case TASKSTATS_TYPE_TGID: + break; case TASKSTATS_TYPE_STATS: nla_memcpy(stats, attr, sizeof(struct taskstats)); break; -- 2.7.4