Skip to contentSkip to conversation

pid: Properly detect orphaned process groups in exit_notify

PATCH New Eric W. Biederman 1 participant 1 message Mar 29, 2007 7 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

PATCH 1/1 pid: Properly detect orphaned process groups in exit_notify

In commit 0475ac0845f9295bc5f69af45f58dff2c104c8d1 when converting the converting the orphaned process group handling to use struct pid I made a small mistake. I accidentally replaced an == with a !=.

Besides just being a dumb thing to do apparently this has a bad side effect. The improper orphaned process group detection causes kwin to die after a suspend/resume cycle.

I'm amazed this patch has been around as long as it has without anyone else noticing something funny going on.

And the following people deserve credit for spotting and helping to reproduce this.

Thanks to: Sid Boyce <[email protected]>
Thanks to: "Michael Wu"

---

kernel/exit.c +1 -1
index f132349..b55ed4c 100644
@@ -790,7 +790,7 @@ static void exit_notify(struct task_struct *tsk)
 	
 	pgrp = task_pgrp(tsk);
 	if ((task_pgrp(t) != pgrp) &&
-	    (task_session(t) != task_session(tsk)) &&
+	    (task_session(t) == task_session(tsk)) &&
 	    will_become_orphaned_pgrp(pgrp, tsk) &&
 	    has_stopped_jobs(pgrp)) {
 		__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);