diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/ipc_namespace.h | 3 | ||||
| -rw-r--r-- | include/linux/ns_common.h | 8 | ||||
| -rw-r--r-- | include/linux/pid_namespace.h | 3 | ||||
| -rw-r--r-- | include/linux/user_namespace.h | 3 | ||||
| -rw-r--r-- | include/linux/utsname.h | 3 | ||||
| -rw-r--r-- | include/net/net_namespace.h | 3 |
6 files changed, 18 insertions, 5 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 35e7eca4e33b..52a640128151 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <linux/rwsem.h> | 6 | #include <linux/rwsem.h> |
| 7 | #include <linux/notifier.h> | 7 | #include <linux/notifier.h> |
| 8 | #include <linux/nsproxy.h> | 8 | #include <linux/nsproxy.h> |
| 9 | #include <linux/ns_common.h> | ||
| 9 | 10 | ||
| 10 | /* | 11 | /* |
| 11 | * ipc namespace events | 12 | * ipc namespace events |
| @@ -68,7 +69,7 @@ struct ipc_namespace { | |||
| 68 | /* user_ns which owns the ipc ns */ | 69 | /* user_ns which owns the ipc ns */ |
| 69 | struct user_namespace *user_ns; | 70 | struct user_namespace *user_ns; |
| 70 | 71 | ||
| 71 | unsigned int proc_inum; | 72 | struct ns_common ns; |
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| 74 | extern struct ipc_namespace init_ipc_ns; | 75 | extern struct ipc_namespace init_ipc_ns; |
diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h new file mode 100644 index 000000000000..e7db1cd54047 --- /dev/null +++ b/include/linux/ns_common.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef _LINUX_NS_COMMON_H | ||
| 2 | #define _LINUX_NS_COMMON_H | ||
| 3 | |||
| 4 | struct ns_common { | ||
| 5 | unsigned int inum; | ||
| 6 | }; | ||
| 7 | |||
| 8 | #endif | ||
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 1997ffc295a7..b9cf6c51b181 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/threads.h> | 8 | #include <linux/threads.h> |
| 9 | #include <linux/nsproxy.h> | 9 | #include <linux/nsproxy.h> |
| 10 | #include <linux/kref.h> | 10 | #include <linux/kref.h> |
| 11 | #include <linux/ns_common.h> | ||
| 11 | 12 | ||
| 12 | struct pidmap { | 13 | struct pidmap { |
| 13 | atomic_t nr_free; | 14 | atomic_t nr_free; |
| @@ -43,7 +44,7 @@ struct pid_namespace { | |||
| 43 | kgid_t pid_gid; | 44 | kgid_t pid_gid; |
| 44 | int hide_pid; | 45 | int hide_pid; |
| 45 | int reboot; /* group exit code if this pidns was rebooted */ | 46 | int reboot; /* group exit code if this pidns was rebooted */ |
| 46 | unsigned int proc_inum; | 47 | struct ns_common ns; |
| 47 | }; | 48 | }; |
| 48 | 49 | ||
| 49 | extern struct pid_namespace init_pid_ns; | 50 | extern struct pid_namespace init_pid_ns; |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index e95372654f09..4cf06c140e21 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/kref.h> | 4 | #include <linux/kref.h> |
| 5 | #include <linux/nsproxy.h> | 5 | #include <linux/nsproxy.h> |
| 6 | #include <linux/ns_common.h> | ||
| 6 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
| 7 | #include <linux/err.h> | 8 | #include <linux/err.h> |
| 8 | 9 | ||
| @@ -26,7 +27,7 @@ struct user_namespace { | |||
| 26 | int level; | 27 | int level; |
| 27 | kuid_t owner; | 28 | kuid_t owner; |
| 28 | kgid_t group; | 29 | kgid_t group; |
| 29 | unsigned int proc_inum; | 30 | struct ns_common ns; |
| 30 | 31 | ||
| 31 | /* Register of per-UID persistent keyrings for this namespace */ | 32 | /* Register of per-UID persistent keyrings for this namespace */ |
| 32 | #ifdef CONFIG_PERSISTENT_KEYRINGS | 33 | #ifdef CONFIG_PERSISTENT_KEYRINGS |
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index 239e27733d6c..5093f58ae192 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
| 6 | #include <linux/kref.h> | 6 | #include <linux/kref.h> |
| 7 | #include <linux/nsproxy.h> | 7 | #include <linux/nsproxy.h> |
| 8 | #include <linux/ns_common.h> | ||
| 8 | #include <linux/err.h> | 9 | #include <linux/err.h> |
| 9 | #include <uapi/linux/utsname.h> | 10 | #include <uapi/linux/utsname.h> |
| 10 | 11 | ||
| @@ -23,7 +24,7 @@ struct uts_namespace { | |||
| 23 | struct kref kref; | 24 | struct kref kref; |
| 24 | struct new_utsname name; | 25 | struct new_utsname name; |
| 25 | struct user_namespace *user_ns; | 26 | struct user_namespace *user_ns; |
| 26 | unsigned int proc_inum; | 27 | struct ns_common ns; |
| 27 | }; | 28 | }; |
| 28 | extern struct uts_namespace init_uts_ns; | 29 | extern struct uts_namespace init_uts_ns; |
| 29 | 30 | ||
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index e0d64667a4b3..2e8756b8c775 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #endif | 26 | #endif |
| 27 | #include <net/netns/nftables.h> | 27 | #include <net/netns/nftables.h> |
| 28 | #include <net/netns/xfrm.h> | 28 | #include <net/netns/xfrm.h> |
| 29 | #include <linux/ns_common.h> | ||
| 29 | 30 | ||
| 30 | struct user_namespace; | 31 | struct user_namespace; |
| 31 | struct proc_dir_entry; | 32 | struct proc_dir_entry; |
| @@ -60,7 +61,7 @@ struct net { | |||
| 60 | 61 | ||
| 61 | struct user_namespace *user_ns; /* Owning user namespace */ | 62 | struct user_namespace *user_ns; /* Owning user namespace */ |
| 62 | 63 | ||
| 63 | unsigned int proc_inum; | 64 | struct ns_common ns; |
| 64 | 65 | ||
| 65 | struct proc_dir_entry *proc_net; | 66 | struct proc_dir_entry *proc_net; |
| 66 | struct proc_dir_entry *proc_net_stat; | 67 | struct proc_dir_entry *proc_net_stat; |
