summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vserver-sources/old/2.1.1_rc18-r1/4417_vs2.1.1-rc18-reaper-fix02.patch')
-rw-r--r--vserver-sources/old/2.1.1_rc18-r1/4417_vs2.1.1-rc18-reaper-fix02.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/vserver-sources/old/2.1.1_rc18-r1/4417_vs2.1.1-rc18-reaper-fix02.patch b/vserver-sources/old/2.1.1_rc18-r1/4417_vs2.1.1-rc18-reaper-fix02.patch
new file mode 100644
index 0000000..762e8ee
--- /dev/null
+++ b/vserver-sources/old/2.1.1_rc18-r1/4417_vs2.1.1-rc18-reaper-fix02.patch
@@ -0,0 +1,42 @@
+Index: vserver-sources-2.6.16_2.1.1/kernel/exit.c
+===================================================================
+--- vserver-sources-2.6.16_2.1.1.orig/kernel/exit.c
++++ vserver-sources-2.6.16_2.1.1/kernel/exit.c
+@@ -241,7 +241,6 @@ static void reparent_to_init(void)
+ ptrace_unlink(current);
+ /* Reparent to init */
+ REMOVE_LINKS(current);
+- /* FIXME: handle vchild_reaper/initpid */
+ current->parent = child_reaper;
+ current->real_parent = child_reaper;
+ SET_LINKS(current);
+@@ -544,6 +543,11 @@ static void exit_mm(struct task_struct *
+
+ static inline void choose_new_parent(task_t *p, task_t *reaper)
+ {
++ /* check for reaper context */
++ vxwprintk((p->xid != reaper->xid) && (reaper != child_reaper),
++ "rogue reaper: %p[%d,#%u] <> %p[%d,#%u]",
++ p, p->pid, p->xid, reaper, reaper->pid, reaper->xid);
++
+ /*
+ * Make sure we're not reparenting to ourselves and that
+ * the parent is not a zombie.
+@@ -622,7 +626,6 @@ static void forget_original_parent(struc
+ struct task_struct *p, *reaper = father;
+ struct list_head *_p, *_n;
+
+- /* FIXME: handle vchild_reaper/initpid */
+ do {
+ reaper = next_thread(reaper);
+ if (reaper == father) {
+@@ -672,9 +675,6 @@ static void forget_original_parent(struc
+ list_for_each_safe(_p, _n, &father->ptrace_children) {
+ p = list_entry(_p,struct task_struct,ptrace_list);
+
+- /* check for reaper context */
+- BUG_ON(p->xid != reaper->xid);
+-
+ choose_new_parent(p, reaper);
+ reparent_thread(p, father, 1);
+ }