projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pidns: fix free_pid() to handle the first fork failure
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
kernel
/
pid.c
diff --git
a/kernel/pid.c
b/kernel/pid.c
index
66505c1
..
9b9a266
100644
(file)
--- a/
kernel/pid.c
+++ b/
kernel/pid.c
@@
-265,6
+265,7
@@
void free_pid(struct pid *pid)
struct pid_namespace *ns = upid->ns;
hlist_del_rcu(&upid->pid_chain);
switch(--ns->nr_hashed) {
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
case 1:
/* When all that is left in the pid namespace
* is the reaper wake up the reaper. The reaper
@@
-272,6
+273,11
@@
void free_pid(struct pid *pid)
*/
wake_up_process(ns->child_reaper);
break;
*/
wake_up_process(ns->child_reaper);
break;
+ case PIDNS_HASH_ADDING:
+ /* Handle a fork failure of the first process */
+ WARN_ON(ns->child_reaper);
+ ns->nr_hashed = 0;
+ /* fall through */
case 0:
schedule_work(&ns->proc_work);
break;
case 0:
schedule_work(&ns->proc_work);
break;