mirror of
https://github.com/openharmony/kernel_linux_common_modules.git
synced 2026-08-26 17:16:37 -04:00
current pid verify change to tgid
Signed-off-by: 杨世琦_hw <670097973@qq.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user