Merge tag 'v3.10.87' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / pid.c
index 0db3e791a06d48594606bc4789bc8fbe0fd5a4f0..60af6a023c0e5830103f2916d5b81ae302ca003a 100644 (file)
@@ -264,6 +264,7 @@ void free_pid(struct pid *pid)
                struct pid_namespace *ns = upid->ns;
                hlist_del_rcu(&upid->pid_chain);
                switch(--ns->nr_hashed) {
+               case 2:
                case 1:
                        /* When all that is left in the pid namespace
                         * is the reaper wake up the reaper.  The reaper
@@ -334,6 +335,8 @@ out:
 
 out_unlock:
        spin_unlock_irq(&pidmap_lock);
+       put_pid_ns(ns);
+
 out_free:
        while (++i <= ns->level)
                free_pidmap(pid->numbers + i);
@@ -447,6 +450,7 @@ struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
                           " protection");
        return pid_task(find_pid_ns(nr, ns), PIDTYPE_PID);
 }
+EXPORT_SYMBOL_GPL(find_task_by_pid_ns);
 
 struct task_struct *find_task_by_vpid(pid_t vnr)
 {