mbox series

[v1,0/7] pid: Introduce helper task_is_in_root_ns()

Message ID 20211205145105.57824-1-leo.yan@linaro.org (mailing list archive)
Headers show
Series pid: Introduce helper task_is_in_root_ns() | expand

Message

Leo Yan Dec. 5, 2021, 2:50 p.m. UTC
The kernel uses open code to check if a process is in root PID namespace
or not in several places.

Suggested by Suzuki, this patch set is to create a helper function
task_is_in_root_ns() so we can use it replace open code.

To test this patch set, I built Arm64 kernel with enabling all relevant
modules, and verified the kernel with CoreSight module on Arm64 Juno
board.


Leo Yan (7):
  pid: Introduce helper task_is_in_root_ns()
  coresight: etm3x: Use task_is_in_root_ns() to check PID namespace
  coresight: etm4x: Use task_is_in_root_ns() to check PID namespace
  connector/cn_proc: Use task_is_in_root_ns() to check PID namespace
  coda: Use task_is_in_root_ns()
  audit: Use task_is_in_root_ns()
  taskstats: Use task_is_in_root_ns()

 drivers/connector/cn_proc.c                         | 2 +-
 drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | 8 ++++----
 drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 8 ++++----
 fs/coda/inode.c                                     | 2 +-
 fs/coda/psdev.c                                     | 2 +-
 include/linux/pid_namespace.h                       | 5 +++++
 kernel/audit.c                                      | 2 +-
 kernel/taskstats.c                                  | 2 +-
 8 files changed, 18 insertions(+), 13 deletions(-)