diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-01-29 15:57:40 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-02-10 11:39:31 +0100 |
| commit | 3673dd3c7dc1f37baf0448164d323d7c7a44d1da (patch) | |
| tree | d5852201267bb4468067c9471179b15bafb0b6db /include | |
| parent | 87caaeef79950377b616f3ba2265a82742cb9583 (diff) | |
| parent | 84f90ab5d3e859cced1d7b080adc4ea562ca2eaa (diff) | |
Merge patch series "Revert "pid: make __task_pid_nr_ns(ns => NULL) safe for zombie callers""
Commit 006568ab4c5c ("pid: Add a judgment for ns null in pid_nr_ns")
already added the ns != NULL check in pid_nr_ns(), so we can remove the
same check from __task_pid_nr_ns().
* patches from https://patch.msgid.link/20251015123550.GA9447@redhat.com:
pid: introduce task_ppid_vnr() helper
Revert "pid: make __task_pid_nr_ns(ns => NULL) safe for zombie callers"
Link: https://patch.msgid.link/20251015123550.GA9447@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/pid.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h index ce9b5cb7560b..ddaef0bbc8ba 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -310,6 +310,11 @@ static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_na return pid; } +static inline pid_t task_ppid_vnr(const struct task_struct *tsk) +{ + return task_ppid_nr_ns(tsk, NULL); +} + static inline pid_t task_ppid_nr(const struct task_struct *tsk) { return task_ppid_nr_ns(tsk, &init_pid_ns); |
