get the pid namespace by following task_active_pid_ns()
authorLi Chengyuan <chengyuanli@hotmail.com>
Fri, 1 Oct 2021 06:36:24 +0000 (23:36 -0700)
committeryonghong-song <ys114321@gmail.com>
Wed, 20 Oct 2021 15:32:57 +0000 (08:32 -0700)
commitbced75aae53c22524fd335b04a005ce60384b8a8
tree65216cdb92c0fd8c82dd929071852c3432776361
parent2510ad738e9ee5a89d599569478e53b6c3969c9e
get the pid namespace by following task_active_pid_ns()

When unsharing of pid namespace, though nsproxy->pid_ns_for_children is
new, the process is still in the orignal pid namespace, only the forked
children processes will be in the new pid namespace.
So it's not correct to get process's pid namespace by nsproxy->pid_ns_for_children,
should get pid namespace by task_active_pid_ns() way, i.e.
pid->numbers[pid->level].ns

Signed-off-by: Li Chengyuan chengyuanli@hotmail.com
libbpf-tools/runqlat.bpf.c