diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c index 767c93d38bf554632f28a42c68a5c12508dd7cf6..f3d3a562a802a6b2b99dd7439a55b3ac382c43a7 100644 --- a/kernel/bpf/task_iter.c +++ b/kernel/bpf/task_iter.c @@ -158,13 +158,14 @@ task_file_seq_get_next(struct bpf_iter_seq_task_file_info *info) if (!curr_task) { info->task = NULL; info->files = NULL; + info->tid = curr_tid; return NULL; } curr_files = get_files_struct(curr_task); if (!curr_files) { put_task_struct(curr_task); - curr_tid = ++(info->tid); + curr_tid = curr_tid + 1; info->fd = 0; goto again; }