diff --git a/ucollection/ucollection_process_cpu.c b/ucollection/ucollection_process_cpu.c index 339f78a025b1ffb88262ea4e49ebb8ac67f4564b..9fa5d7f3bdb3aa1d4646faefb4df6ad831e4a3d4 100644 --- a/ucollection/ucollection_process_cpu.c +++ b/ucollection/ucollection_process_cpu.c @@ -224,9 +224,9 @@ static long ioctrl_collect_app_thread_cpu(void __user *argp) } memset(&kentry, 0, sizeof(struct ucollection_thread_cpu_entry)); (void)copy_from_user(&kentry, entry, sizeof(struct ucollection_thread_cpu_entry)); - if (current->pid != kentry.filter.pid || kentry.cur_count >= kentry.total_count) { - pr_err("pid=%d is not self current:%d , or current count over total count" - , kentry.filter.pid, current->pid); + if (current->tgid != kentry.filter.pid || kentry.cur_count >= kentry.total_count) { + pr_err("pid=%d is not self current tgid:%d , or current count over total count" + , kentry.filter.pid, current->tgid); return -EINVAL; } return read_thread_info_locked(&kentry, entry);