[PATCH] wext: extend MLME support
[firefly-linux-kernel-4.4.55.git] / include / linux / nsproxy.h
index 7bdebfaab6a5b18c4b9523f70efe3c7b7b1c37e6..971d1c6dfc4bf0dbffff439c5ee643fc5547832e 100644 (file)
@@ -4,6 +4,10 @@
 #include <linux/spinlock.h>
 #include <linux/sched.h>
 
+struct namespace;
+struct uts_namespace;
+struct ipc_namespace;
+
 /*
  * A structure to contain pointers to all per-process
  * namespaces - fs (mount), uts, network, sysvipc, etc.
@@ -19,6 +23,9 @@
 struct nsproxy {
        atomic_t count;
        spinlock_t nslock;
+       struct uts_namespace *uts_ns;
+       struct ipc_namespace *ipc_ns;
+       struct namespace *namespace;
 };
 extern struct nsproxy init_nsproxy;
 
@@ -38,8 +45,10 @@ static inline void exit_task_namespaces(struct task_struct *p)
 {
        struct nsproxy *ns = p->nsproxy;
        if (ns) {
-               put_nsproxy(ns);
+               task_lock(p);
                p->nsproxy = NULL;
+               task_unlock(p);
+               put_nsproxy(ns);
        }
 }
 #endif