Merge tag 'v3.10.87' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / pid_namespace.c
index 69473c4a653f72e47affee5bc71e832336da7f60..e32703d5e0ab7c05083efb1eef9a67ad40fa0f2c 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/err.h>
 #include <linux/acct.h>
 #include <linux/slab.h>
-#include <linux/proc_fs.h>
+#include <linux/proc_ns.h>
 #include <linux/reboot.h>
 #include <linux/export.h>
 
@@ -312,7 +312,9 @@ static void *pidns_get(struct task_struct *task)
        struct pid_namespace *ns;
 
        rcu_read_lock();
-       ns = get_pid_ns(task_active_pid_ns(task));
+       ns = task_active_pid_ns(task);
+       if (ns)
+               get_pid_ns(ns);
        rcu_read_unlock();
 
        return ns;