OSDN Git Service

futex: Make lookup_pi_state more robust
[android-x86/kernel.git] / kernel / pid_namespace.c
index 6917e8e..e32703d 100644 (file)
@@ -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;