mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pid:  Properly detect orphaned process groups in exit_notify
       [not found]           ` <ac10ef410703282142j2ab375fbi793cb4db908540f6@mail.gmail.com>
@ 2007-03-29  5:38             ` Eric W. Biederman
  0 siblings, 0 replies; only message in thread
From: Eric W. Biederman @ 2007-03-29  5:38 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Sid Boyce, Adrian Bunk, linux-kernel


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 <g3vbv@blueyonder.co.uk>
Thanks to: "Michael Wu"

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---

diff --git a/kernel/exit.c b/kernel/exit.c
index f132349..b55ed4c 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-29  5:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <ac10ef410703271555s6c4d7b95hc94091bae575600d@mail.gmail.com>
     [not found] ` <m1648lqzsf.fsf@ebiederm.dsl.xmission.com>
     [not found]   ` <ac10ef410703280946oe46b0a5pdd5dcfb0419713ca@mail.gmail.com>
     [not found]     ` <m14po5ozbx.fsf@ebiederm.dsl.xmission.com>
     [not found]       ` <ac10ef410703281835o6d2c258fkd905467bfc089ffa@mail.gmail.com>
     [not found]         ` <m1vegkn1bz.fsf@ebiederm.dsl.xmission.com>
     [not found]           ` <ac10ef410703282142j2ab375fbi793cb4db908540f6@mail.gmail.com>
2007-03-29  5:38             ` [PATCH] pid: Properly detect orphaned process groups in exit_notify Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®