#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.
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;
{
struct nsproxy *ns = p->nsproxy;
if (ns) {
- put_nsproxy(ns);
+ task_lock(p);
p->nsproxy = NULL;
+ task_unlock(p);
+ put_nsproxy(ns);
}
}
#endif