linux/include
Leo Yan d7e4f8545b pid: Introduce helper task_is_in_init_pid_ns()
Currently the kernel uses open code in multiple places to check if a
task is in the root PID namespace with the kind of format:

  if (task_active_pid_ns(current) == &init_pid_ns)
      do_something();

This patch creates a new helper function, task_is_in_init_pid_ns(), it
returns true if a passed task is in the root PID namespace, otherwise
returns false.  So it will be used to replace open codes.

Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-01-26 18:57:09 -08:00
..
acpi USB/Thunderbolt changes for 5.17-rc1 2022-01-12 11:27:57 -08:00
asm-generic hyperv-next for 5.17 2022-01-16 15:53:00 +02:00
clocksource
crypto lib/crypto: blake2s: move hmac construction into wireguard 2022-01-18 13:03:55 +01:00
drm Merge tag 'drm-msm-next-2021-12-26' of ssh://gitlab.freedesktop.org/drm/msm into drm-next 2021-12-29 14:02:44 +10:00
dt-bindings Char/Misc and other driver changes for 5.17-rc1 2022-01-14 16:02:28 +01:00
keys keys: X.509 public key issuer lookup without AKID 2022-01-09 00:18:42 +02:00
kunit kunit: replace kernel.h with the necessary inclusions 2022-01-20 08:52:54 +02:00
kvm RISCV: 2022-01-16 16:15:14 +02:00
linux pid: Introduce helper task_is_in_init_pid_ns() 2022-01-26 18:57:09 -08:00
math-emu
media
memory
misc
net bonding: use rcu_dereference_rtnl when get bonding active slave 2022-01-24 11:57:38 +00:00
pcmcia
ras mm/hwpoison: remove MF_MSG_BUDDY_2ND and MF_MSG_POISONED_HUGE 2022-01-15 16:30:31 +02:00
rdma RDMA/core: Calculate UDP source port based on flow label or lqpn/rqpn 2022-01-07 19:34:01 -04:00
scsi SCSI misc on 20220113 2022-01-14 14:37:34 +01:00
soc Networking changes for 5.17. 2022-01-10 19:06:09 -08:00
sound ASoC: Updates for v5.17 2022-01-10 14:33:42 +01:00
target
trace Merge branch 'akpm' (patches from Andrew) 2022-01-20 10:41:01 +02:00
uapi Merge branch 'akpm' (patches from Andrew) 2022-01-20 10:41:01 +02:00
vdso
video
xen xen: branch for v5.17-rc1 2022-01-12 16:42:00 -08:00