mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
pid: Split out pid_types.h
Trimming down sched.h dependencies: we dont't want to include more than the base types. Cc: Kees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Will Drewry <wad@chromium.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
f038cc1379
commit
6d5e9d6368
@ -15,6 +15,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/configfs.h>
|
||||
#include <linux/ratelimit.h>
|
||||
#include <scsi/scsi_proto.h>
|
||||
|
@ -2,18 +2,10 @@
|
||||
#ifndef _LINUX_PID_H
|
||||
#define _LINUX_PID_H
|
||||
|
||||
#include <linux/pid_types.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/refcount.h>
|
||||
|
||||
enum pid_type
|
||||
{
|
||||
PIDTYPE_PID,
|
||||
PIDTYPE_TGID,
|
||||
PIDTYPE_PGID,
|
||||
PIDTYPE_SID,
|
||||
PIDTYPE_MAX,
|
||||
};
|
||||
#include <linux/wait.h>
|
||||
|
||||
/*
|
||||
* What is struct pid?
|
||||
@ -110,9 +102,6 @@ extern void exchange_tids(struct task_struct *task, struct task_struct *old);
|
||||
extern void transfer_pid(struct task_struct *old, struct task_struct *new,
|
||||
enum pid_type);
|
||||
|
||||
struct pid_namespace;
|
||||
extern struct pid_namespace init_pid_ns;
|
||||
|
||||
extern int pid_max;
|
||||
extern int pid_max_min, pid_max_max;
|
||||
|
||||
|
16
include/linux/pid_types.h
Normal file
16
include/linux/pid_types.h
Normal file
@ -0,0 +1,16 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _LINUX_PID_TYPES_H
|
||||
#define _LINUX_PID_TYPES_H
|
||||
|
||||
enum pid_type {
|
||||
PIDTYPE_PID,
|
||||
PIDTYPE_TGID,
|
||||
PIDTYPE_PGID,
|
||||
PIDTYPE_SID,
|
||||
PIDTYPE_MAX,
|
||||
};
|
||||
|
||||
struct pid_namespace;
|
||||
extern struct pid_namespace init_pid_ns;
|
||||
|
||||
#endif /* _LINUX_PID_TYPES_H */
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <asm/current.h>
|
||||
|
||||
#include <linux/pid.h>
|
||||
#include <linux/pid_types.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/shm.h>
|
||||
#include <linux/kmsan_types.h>
|
||||
|
@ -126,6 +126,8 @@ static inline long seccomp_get_metadata(struct task_struct *task,
|
||||
|
||||
#ifdef CONFIG_SECCOMP_CACHE_DEBUG
|
||||
struct seq_file;
|
||||
struct pid_namespace;
|
||||
struct pid;
|
||||
|
||||
int proc_pid_seccomp_cache(struct seq_file *m, struct pid_namespace *ns,
|
||||
struct pid *pid, struct task_struct *task);
|
||||
|
Loading…
Reference in New Issue
Block a user