aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nsproxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nsproxy.h')
-rw-r--r--include/linux/nsproxy.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
index f6baecdeecd6..971d1c6dfc4b 100644
--- a/include/linux/nsproxy.h
+++ b/include/linux/nsproxy.h
@@ -45,8 +45,10 @@ static inline void exit_task_namespaces(struct task_struct *p)
45{ 45{
46 struct nsproxy *ns = p->nsproxy; 46 struct nsproxy *ns = p->nsproxy;
47 if (ns) { 47 if (ns) {
48 put_nsproxy(ns); 48 task_lock(p);
49 p->nsproxy = NULL; 49 p->nsproxy = NULL;
50 task_unlock(p);
51 put_nsproxy(ns);
50 } 52 }
51} 53}
52#endif 54#endif